Commit 4abcade
fix(audience): volatile _disposed + tighter shutdown ordering
Addresses cursor[bot] review comment on EventQueue.cs:29.
- Mark _disposed as volatile so the shutdown signal is visible across
threads. On weakly-ordered architectures (ARM — Apple Silicon, etc.)
the C# memory model does not guarantee a non-volatile write is
eventually observed by other threads without a fence.
- Reorder Shutdown: set _disposed=true first, before canceling the drain
thread. The shutdown flag being the first observable state change is a
safer ordering and makes the lifecycle easier to reason about.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b9ebac5 commit 4abcade
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | | - | |
| 84 | + | |
78 | 85 | | |
79 | | - | |
80 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| |||
0 commit comments