How to implement a unmanaged thread-safe collection when I get this error: is not supported when compiling with /clr

It is not supported because the std::mutex implementation uses GetCurrentThreadId(). That’s a winapi function that is not supposed to be use in managed code since it might be running on a custom CLR host that doesn’t use threads to implement threading. This is the good kind of problem to have, it shows that you are … Read more