Skip to content

fix(js): use SeqCst ordering for cancellation flag#1044

Merged
chaliy merged 3 commits intomainfrom
fix/issue-992-cancel-ordering
Apr 4, 2026
Merged

fix(js): use SeqCst ordering for cancellation flag#1044
chaliy merged 3 commits intomainfrom
fix/issue-992-cancel-ordering

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • Changed Ordering::Relaxed to Ordering::SeqCst for all cancellation flag operations in the Node.js bindings (Bash and BashTool structs)
  • Prevents race condition where a concurrent cancel() could be swallowed by execute_sync resetting the flag with no happens-before guarantee

Closes #992

@chaliy chaliy merged commit 7094ac8 into main Apr 4, 2026
20 checks passed
@chaliy chaliy deleted the fix/issue-992-cancel-ordering branch April 4, 2026 01:15
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.

Cancellation flag race condition with Relaxed ordering in Node.js bindings

1 participant