test(libc): wait for std::async thread teardown in host_thread_local #1604
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1604"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Zheorgyan on 2026-10-08T14:10:08Z.
What
host_thread_localfails about 1 run in 3 on macOS. Thestd::asyncblock checks the destroyed count right afterget(), but libc++ makes the future ready when the task stores its result, before the worker thread runs itsthread_localdestructors. So the count can still be short by a few when it is checkedthe check now waits up to 5 seconds for the 8 destructors before comparing. the block still uses
std::async, since that is how the recompiler runs on worker threads, and a missing destructor still fails the test, just after the waitmacOS port: #1
Tested
ctest -R host_thread_localpassestools/check_conventions.pypassesChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Zheorgyan on 2026-10-09T08:32:52Z.
the upstream run for
688df0b8is waiting for approval, so I ran the same Build in my fork on that head: https://github.com/Zheorgyan/AnyPS5/actions/runs/37902312975. linux and windows passImported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:45:41Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
688df0b8, merged ontomaind70b8998in one build with 38 other PRs that had no Windows run.host_thread_local. None of them reported skipping a case.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T01:14:19Z.
Checked the wait loop (bounded at 5 s, still aborts if the 8 destructors don't run), local build and
host_thread_localpass on Linux, CI green, and popcoder565's native Windows run passes too; merging.