Why isn't std::condition_variable templated by lock type?

后端 未结 1 1985
栀梦
栀梦 2021-01-25 05:19

It\'s useful to have the ability to assert in debug mode, with reasonably small overhead, whether a mutex is locked. Viewing the known options, I\'ve chosen to implement this us

相关标签:
1条回答
  • 2021-01-25 06:10

    Try std::condition_variable_any. It has a template version of wait.

    0 讨论(0)
提交回复
热议问题