cats-effect icon indicating copy to clipboard operation
cats-effect copied to clipboard

Add `Async#asyncPoll` for #3087

Open seigert opened this issue 3 years ago • 3 comments

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.

seigert avatar Jul 11 '22 18:07 seigert

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."

seigert avatar Jul 11 '22 19:07 seigert

@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. :(

seigert avatar Jul 14 '22 07:07 seigert

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 :(

armanbilge avatar Jul 14 '22 12:07 armanbilge