paulk-asert opened a new pull request, #2867:
URL: https://github.com/apache/groovy/pull/2867

   A deadline can now be a branch of a ChannelSelect rather than an exception 
thrown around it by orTimeout. AsyncChannel.after(millis) and after(Duration) 
create a capacity-1 channel that delivers the Instant it fired and then closes, 
in the manner of Go's time.After. Being an ordinary built-in channel it takes 
part in the claim protocol, so a losing timer is withdrawn rather than 
consumed, and it composes with per-branch deadlines, when() guards, fair() and 
random().
   
   The clock starts at creation. A timer that has delivered its value closes, 
so a second receive fails with ChannelClosedException instead of waiting 
forever. Closing a timer before it fires cancels the scheduled task; a negative 
delay fires at once, which suits deadlines computed from an absolute time 
already passed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to