Fix flag lock race condition in Debug.

This commit is contained in:
Matthew Parkinson
2021-12-17 11:46:06 +00:00
committed by Matthew Parkinson
parent be85d53c20
commit 91d500baf8

View File

@@ -63,7 +63,7 @@ namespace snmalloc
* std::thread::id can be another solution but it does not
* support `constexpr` initialisation on some platforms.
*/
ThreadIdentity owner = nullptr;
std::atomic<ThreadIdentity> owner = nullptr;
/**
* @brief get_thread_identity