Remove timeouts from Futures
Needlessly complicates things, add sugar for:
scheduler.scheduleOnce(X time, promise completeWithException new FutureTimeoutException(...) with NoStackTrace)
scheduler.scheduleOnce(X time, promise completeWithException new FutureTimeoutException(...) with NoStackTrace)
Leave a comment
on 2011-12-05 19:41 *
By Derek Williams
It might be a good idea to also cancel the scheduled task when the promise is completed so the promise can be garbage collected sooner. I don't think it's a big problem, but it might be something to think about.
on 2011-12-06 11:00 *
By viktorklang
Yeah, that's a very good idea Derek! It'd be crazy simple to do also, and you only pay the price if you actually use timeouts. What are your thoughts on the idea as a whole? Would love to hear what you think.
on 2011-12-08 22:38 *
By viktorklang
Assigned to set to viktorklang
Status changed from New to Accepted