[valgrind] [Bug 374414] unlocking mutex before calling notify_one/all on condition variable triggers an error

2017-01-04 Thread Yuval Lifshitz
https://bugs.kde.org/show_bug.cgi?id=374414 --- Comment #5 from Yuval Lifshitz --- didn't say that wake-up is not missed. but the program would still perform correctly, since the protected variables "ready" and "processed" are either being checked inside the mutex or being

[valgrind] [Bug 374414] unlocking mutex before calling notify_one/all on condition variable triggers an error

2017-01-04 Thread Bart Van Assche
https://bugs.kde.org/show_bug.cgi?id=374414 --- Comment #4 from Bart Van Assche --- I do not agree that a loop like "while (!ready) cv.wait(lk);" would be a correct way to wait for cv to be signaled. If a sleep() statement would be inserted before or inside that loop the

[valgrind] [Bug 374414] unlocking mutex before calling notify_one/all on condition variable triggers an error

2017-01-04 Thread Yuval Lifshitz
https://bugs.kde.org/show_bug.cgi?id=374414 --- Comment #3 from Yuval Lifshitz --- what about the following case: we change: cv.wait(lk, []{return ready;}); to (which should be similar): while (!ready) cv.wait(lk); in this case, as long as there is only one thread waiting on

[valgrind] [Bug 374414] unlocking mutex before calling notify_one/all on condition variable triggers an error

2017-01-01 Thread Bart Van Assche
https://bugs.kde.org/show_bug.cgi?id=374414 Bart Van Assche changed: What|Removed |Added CC||bvanass...@acm.org

[valgrind] [Bug 374414] unlocking mutex before calling notify_one/all on condition variable triggers an error

2017-01-01 Thread Ivo Raisr
https://bugs.kde.org/show_bug.cgi?id=374414 Ivo Raisr changed: What|Removed |Added CC||iv...@ivosh.net --- Comment #1