[wpiutil] Synchronization: fix shutdown use-after-free (#8213)

Also in ntcore, join the notifier thread on shutdown.
This prevents tsan from reporting it as a leaked thread.
This commit is contained in:
Peter Johnson
2025-09-08 21:15:00 -07:00
committed by GitHub
parent 5cd97c6353
commit f8ed2a4d92
4 changed files with 123 additions and 32 deletions

View File

@@ -13,6 +13,7 @@ using namespace nt;
std::atomic<int> InstanceImpl::s_default{-1};
std::atomic<InstanceImpl*> InstanceImpl::s_instances[kNumInstances];
wpi::mutex InstanceImpl::s_mutex;
InstanceImpl::Cleanup InstanceImpl::s_cleanup;
using namespace std::placeholders;