When to use recursive mutex?

后端 未结 6 617
旧时难觅i
旧时难觅i 2020-11-30 19:36

I understand recursive mutex allows mutex to be locked more than once without getting to a deadlock and should be unlocked the same number of times. But in what specific sit

6条回答
  •  悲&欢浪女
    2020-11-30 20:20

    It would certainly be a problem if a thread blocked trying to acquire (again) a mutex it already owned...

    Is there a reason to not permit a mutex to be acquired multiple times by the same thread?

提交回复
热议问题