Skip to content

Make terminationRequested atomic#6363

Merged
erikcorry merged 1 commit intomainfrom
erikcorry/fix-thread-safety
Mar 26, 2026
Merged

Make terminationRequested atomic#6363
erikcorry merged 1 commit intomainfrom
erikcorry/fix-thread-safety

Conversation

@erikcorry
Copy link
Contributor

Since terminateExecution can be called from other threads this needs to be atomic

@erikcorry erikcorry requested review from a team as code owners March 19, 2026 15:53
@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 19, 2026

UnknownError: "Overloaded"

github run

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 19, 2026

@erikcorry Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@erikcorry erikcorry force-pushed the erikcorry/fix-thread-safety branch from 1f46ce2 to acd6899 Compare March 20, 2026 09:50
@dcarney-cf
Copy link
Contributor

normally for something like this, i'd go with acquire/release semantics . i guess i don't know what workerd generally goes with for this type of thing, but explicit loads and stores make atomic semantics much more clear

@jasnell
Copy link
Collaborator

jasnell commented Mar 20, 2026

...i guess i don't know what workerd generally goes with for this type of thing

kj::MutexGuarded<T> ... fwiw.

@erikcorry erikcorry merged commit 9a696e4 into main Mar 26, 2026
22 of 24 checks passed
@erikcorry erikcorry deleted the erikcorry/fix-thread-safety branch March 26, 2026 14:22
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.

4 participants