atomic.cpp: implement notify callback

Notification can be very heavy, especially if we need to wake many threads.
Callback is set for cpu_thread in order to set wait flag accordingly.
This commit is contained in:
Nekotekina 2020-10-26 04:02:39 +03:00
parent 0a121e9d26
commit 6806e3d5c7
4 changed files with 94 additions and 4 deletions

View file

@ -1970,7 +1970,7 @@ bool thread_base::finalize(thread_state result_state) noexcept
void thread_base::finalize() noexcept
{
atomic_storage_futex::set_wait_callback([](const void*){ return true; });
atomic_storage_futex::set_wait_callback(nullptr);
g_tls_log_prefix = []() -> std::string { return {}; };
thread_ctrl::g_tls_this_thread = nullptr;
}