summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-02-17 05:17:10 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-02-17 05:17:52 -0800
commited37a45a374dce32f78ca65d873902364963dfc2 (patch)
tree7cf706e4ec8c9ae206151865725dbf0889d5e7a2 /ci
parent0372af19f2f4f588351ca8f71b3f528cbe467a4d (diff)
Synchronization: Add support for true relative timeouts using
monotonic clocks on Linux when the implementation uses futexes After this change, when synchronization methods that wait are passed an absl::Duration to limit the wait time, these methods will wait for that interval, even if the system clock is changed (subject to any limitations with how CLOCK_MONOTONIC keeps track of time). In other words, an observer measuring the time with a stop watch will now see the correct interval, even if the system clock is changed. Previously, the duration was added to the current time, and methods would wait until that time was reached on the possibly changed realtime system clock. The behavior of the synchronization methods that take an absl::Time is unchanged. These methods always wait until the absolute point in time is reached and respect changes to the system clock. In other words, an observer will always see the timeout occur when a wall clock reaches that time, even if the clock is manipulated externally. Note: ABSL_PREDICT_FALSE was removed from the error case in Futex as timeouts are handled by this case, and timeouts are part of normal operation. PiperOrigin-RevId: 510405347 Change-Id: I0b3ea390de97014cfa353079ae2e0c1c637aca69
Diffstat (limited to 'ci')
0 files changed, 0 insertions, 0 deletions