Skip to content

Conversation

@1stub
Copy link
Collaborator

@1stub 1stub commented Dec 10, 2025

I believe this fixes the issue with CI hanging when running GC tests. After some thought, it appears using std::jthread for our decs thread is problematic as join is called on these at the destruction of a BSQMemoryThreadLocalInfo object, not necessarily when we signal from main that our program is done.

So, we now use std::thread and (in DecsProcessor::signalFinished()) once the worker thread has ack'd completion we call an explicit join.

I tested this locally using act and it appears to be fixed, so hopefully this is reflected in github CI.

@1stub 1stub requested a review from marron-at-work December 10, 2025 17:51
@1stub
Copy link
Collaborator Author

1stub commented Dec 10, 2025

After being confused for a while I realized there were some flaws in my state management logic between threads causing decrement thread state to not be communicated well. This lead to infinite waiting.

My new changes shifted towards a more organized decs thread state management and less complex conditionals. Instead of using multiple flaky booleans we use a singular state enum (which I should have done from the start).

I tested this by making a pr within my fork to trigger ci and we are passing there, so things should be good now. Multi-threadded programming is tricky!

@1stub 1stub merged commit 4c6c970 into BosqueLanguage:main Dec 10, 2025
1 check passed
@1stub 1stub deleted the 12_10_thread_ci_fix branch December 10, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants