According to http://en.cppreference.com/w/cpp/thread/condition_variable/wait :
Atomically releases the lock, blocks the current executable thread and adds it to the list of threads waiting * for this. The thread will be unlocked when notify_all () or notify_one () is executed. It can also be unlocked falsely. When unlocking, regardless of the reason, the lock will be restored and will wait for an exit. If this function throws an exception, the lock is also reused. (before C ++ 14)
I cannot understand why the selected statement is being deleted from C ++ 14.
Does it mean:
Since C ++ 14, if this function fails due to an exception, the lock will not be restored?
If yes:
What is the rationale?
source share