Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I obtain a mutex recursively (on MMLite) ?

mmlite mutex obtain Recursively
0
Posted

Can I obtain a mutex recursively (on MMLite) ?

0

No. Mutexes are standard (POSIX) and non-recursive objects. If you try to do so you will deadlock immediately, your thread will lock and never return from the Mutex_Lock call. Recursive locks have been avoided by in the standard because they are well known to be error-prone. It is possible to implement any other synchronization primitive using Mutexes and Condition variables so you can add your favorite, see sample.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123