BOOST: recursive shared_mutex?

后端 未结 5 1973
傲寒
傲寒 2021-02-13 04:16

Seems that Boost\'s shared_mutex is non recursive.. Is there anyway around this? (without re implementing the whole stuff)

5条回答
  •  难免孤独
    2021-02-13 04:57

    You'll have to use shared_ptr in those cases. Put your mutex in a shared_ptr and it'll do ref-counting on your mutex, which will gave you simmilar results.

提交回复
热议问题