diff options
| author | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 03:15:02 -0300 |
|---|---|---|
| committer | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 03:15:02 -0300 |
| commit | 12536c2ab33072b8f49a8d012c970093c90c0866 (patch) | |
| tree | 7c4d428bb73644ce57e265eb040e068f24ead4dd /runtime/src/thread_stacks.cpp | |
| parent | 259772edb4042e4c81d9196ec5064a6f84c09ed7 (diff) | |
acphal: stop the XMA worker it was meant to stop
stop_worker set a shared stopping_ flag, moved the thread out and joined it
after releasing worker_mutex_. A wake in that window reset stopping_ and
started a second worker, so the old one kept running and the join could hang.
Each worker is now a std::jthread with its own stop_token (waits use
condition_variable_any with the token), so a stop only reaches its own thread.
acphal_test races 20000 context alloc/release rounds against ENABLE_XMA on a
second thread (the unfixed code hung there intermittently).
AI-assisted. Tested: acphal_test 115 checks, 0 failures, repeated runs
(clang 23 / mingw x64).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions