You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When locking for the purpose of using the wait/signal approach,
one does not have to account the time spent acquiring the lock
towards the timeout. While doing so may reduce the
non-deterministic duration by which a timeout is exceeded
by any implementation of a timeout, such overtime is usually negligible,
unless the lock is highly contended and/or checking the condition
before starting to wait is time-consuming.
The Java SE example for `java.util.concurrent.locks.Condition.awaitNanos`
ignores the time spent acquiring the lock. Doing so potentially reduces
responsiveness to timeouts, but does not
affect other performance characteristics, so I believe such simplification
is worth it and I should have taken this path initially.
JAVA-3927
0 commit comments