[Webkit-unassigned] [Bug 114826] New: ThreadCondition::timedWait should use monotonicallyIncreasingTime
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 18 13:22:42 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=114826
Summary: ThreadCondition::timedWait should use
monotonicallyIncreasingTime
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Web Template Framework
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jmason at blackberry.com
CC: ap at webkit.org, jmason at blackberry.com, anfraga at qnx.com
Both the pthreads and Windows implementations of ThreadCondition::timedWait use the realtime clock (ie. time returned by currentTime) for their timeout. That means that if the system time changes while timedWait is running, the condition will time out at the wrong time. (For example if the clock is set to after the target time, the condition will time out immediately; if it is set forward by an hour, the condition will not time out until it reaches the original target time, which is now more than an hour in the future.) Interval measurements such as timedWait should be based on the monotonic clock (ie. time returned by monotonicallyIncreasingTime).
That means that the semantics of the absoluteTime parameter would change to take a monotonically increasing value, this change must be reflected in all callers (such as BinarySemaphore::wait and MessageQueue::waitForMessageFilteredWithTimeout), and ultimately the absoluteTime passed to each of these functions must come from a call to monotonicallyIncreasingTime() +- an offset.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list