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
This code in this gist happens to work if this line is removed, but it would still wrong without this this line (it will subtly main sometimes):
if (remainingNanos <= 0) break // this window is over
We should remove require(time >= 0) from all time-based methods. They should assume that they should not delay (or assume imediate timeout) when negative time is passed.
The text was updated successfully, but these errors were encountered:
CompletableFuture immediately throws TimeoutException if a timeout is not positive.
Rx, Rx2, and Reactor throw TimeoutException if a timeout is not positive, though timeout task is properly scheduled. Negative delay treated as no delay everywhere, but with Delay task scheduling
Methods like
delay
,withTimeout
,onTimeout
allrequire(time >= 0)
. This leads to error-prone time-based code. See gist for #306 for example: https://gist.github.com/elizarov/34150213209158d0dce0db62d9c0a20fThis code in this gist happens to work if this line is removed, but it would still wrong without this this line (it will subtly main sometimes):
We should remove
require(time >= 0)
from all time-based methods. They should assume that they should not delay (or assume imediate timeout) when negative time is passed.The text was updated successfully, but these errors were encountered: