https://bugs.kde.org/show_bug.cgi?id=374414

Bart Van Assche <bvanass...@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bvanass...@acm.org
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Bart Van Assche <bvanass...@acm.org> ---
Why is this behavior considered to be a bug? Not holding the associated mutex
around pthread_cond_signal() may lead to missed wakeups. It is easy to see in
the example on http://en.cppreference.com/w/cpp/thread/condition_variable that
a wakeup may be missed. Inserting a call to sleep() after
std::unique_lock<std::mutex> lk(m) and before cv.wait(lk, []{return
processed;}) will cause the wakeup not to be noticed.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to