Say we are on linux (C++) and using some threading library to launch threads and I do not know what library it is. Now I need to use mutex. Can I just use the mutex from somewhere (for example, boost::thread, std::thread, tbb), or I have to use the mutex class provided by the same library which launched the threads?
I understand that it is best to use the mutex from the same library. But just curious...Especially, what if we assume all these libraries under discussion uses pthread as underlying threading library?