Implement MutexGuarded::when() for pthreads.
I originally left this unimplemented because pthreads annoyingly doesn't support condvar on top of rwlocks. It turns out there's a trick that can be used involving an extra mutex and some redundant locking operations -- the same trick that powers std::condition_variable_any. I used that here. Win32 support will come in a subsequent commit, before merging to master.
Showing
Please
register
or
sign in
to comment