According to cppreference condition variables require a unique_lock on a std::mutex. This seems like an unfortunate design restriction. Why isn't any kind of lock meeting condition Mutex acceptable?
Asked
Active
Viewed 32 times
1
-
Who would unlock the mutex if you didn't have the unique_lock? – Kerrek SB Aug 12 '15 at 21:55
-
1We have `condition_variable_any` for that. – T.C. Aug 12 '15 at 22:37