multithreading - C++ - init & destory of mutexes and spin-lock -
Is it possible to assign it and it is possible to process a mute in one thread and transfer it to another ?
Thanks
Yes mutex process resources are shared between threads . Just make sure that any other thread can be reached or after that Mute X is reached.
This is a very common pattern in which an object with a Mute X is formed and later destroys the Mute X when the object is destroyed. It will be very upset if you have to ensure that the same thread has destroyed the Mute X - this thread can not be present any more. If this is a mutux shared process, then the process of making it can not exist any more.
Comments
Post a Comment