RESOLVED FIXED 126161
Convert ThreadCondition in WebKit2 over to std::condition_variable
https://bugs.webkit.org/show_bug.cgi?id=126161
Summary Convert ThreadCondition in WebKit2 over to std::condition_variable
Anders Carlsson
Reported 2013-12-23 07:56:56 PST
Convert ThreadCondition in WebKit2 over to std::condition_variable
Attachments
Patch (9.97 KB, patch)
2013-12-23 08:02 PST, Anders Carlsson
no flags
Patch (9.97 KB, patch)
2013-12-23 09:06 PST, Anders Carlsson
no flags
Anders Carlsson
Comment 1 2013-12-23 08:02:14 PST
EFL EWS Bot
Comment 2 2013-12-23 08:11:46 PST
Anders Carlsson
Comment 3 2013-12-23 09:06:40 PST
EFL EWS Bot
Comment 4 2013-12-23 09:12:08 PST
WebKit Commit Bot
Comment 5 2013-12-23 10:33:28 PST
Comment on attachment 219916 [details] Patch Clearing flags on attachment: 219916 Committed r161002: <http://trac.webkit.org/changeset/161002>
WebKit Commit Bot
Comment 6 2013-12-23 10:33:30 PST
All reviewed patches have been landed. Closing bug.
Filip Pizlo
Comment 7 2015-08-12 21:37:28 PDT
Comment on attachment 219916 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=219916&action=review > Source/WebKit2/Platform/CoreIPC/Connection.cpp:423 > - if (!m_waitForMessageCondition.timedWait(m_waitForMessageMutex, absoluteTime)) { > + // FIXME: It would be better if Connection::waitForMessage took an std::chrono::milliseconds instead of a double. > + std::chrono::milliseconds timeoutInMilliseconds(static_cast<std::chrono::milliseconds::rep>(timeout * 1000)); > + if (m_waitForMessageCondition.wait_for(lock, timeoutInMilliseconds) == std::cv_status::timeout) { This looks like a regression: previously, if there was a spurious return from timedWait() that happened just before the timeout and caused us to loop around, the subsequent timedWait() would wake up after the remainder of the original timeout. After the change, if timedWait() returns spuriously and we loop around, we will wait the full timeout. I.e. spurious returns from wait can cause us to never time out. Was this an intentional change in behavior?
Anders Carlsson
Comment 8 2015-08-13 10:17:49 PDT
> > This looks like a regression: previously, if there was a spurious return > from timedWait() that happened just before the timeout and caused us to loop > around, the subsequent timedWait() would wake up after the remainder of the > original timeout. > > After the change, if timedWait() returns spuriously and we loop around, we > will wait the full timeout. I.e. spurious returns from wait can cause us to > never time out. > > Was this an intentional change in behavior? No, good catch.
Note You need to log in before you can comment on or make changes to this bug.