cats-effect
cats-effect copied to clipboard
Add `Async#asyncPoll` for #3087
Implementation of proposed utility method in Async for double-check registration. Also implemented in IO itself and some tests.
I've chosen asyncPoll as a name as method itself reminds me about Rust's Future poll method with also returns computed result or provides waker to schedule another poll sometime later.
Also, should docs for cont be updated about this method? "If you are an implementor, and you have async (or asyncPool), Async.defaultCont provides an implementation of cont in terms of async/asyncPool."
@armanbilge, do you have any insight why check may randomly flick? Yesterday it was IoAppSpec, not it is WorkerThreadNameSpec -- both should be unaffected by my changes. :(
Darn, I just restarted CI for you. IOAppSpec is a well known flake. WorkerThreadNameSpec was only recently added, but I guess it's a flaky one too :(