async icon indicating copy to clipboard operation
async copied to clipboard

Stopping remaining tasks upon completion of one task

Open ukazap opened this issue 1 year ago • 2 comments

In scenarios where multiple tasks are running concurrently, and I need to stop all other tasks prematurely when one of them finishes; Is there a built-in mechanism or an established pattern within the async gem that would help address this use case?

ukazap avatar Jan 24 '24 16:01 ukazap

I think this discussion may be of interest: https://github.com/socketry/async/discussions/292

trevorturk avatar Jan 24 '24 16:01 trevorturk

Async::Waiter seems to be what I’m looking for, unfortunately I’m stuck at Ruby 3.0.1. Would it be possible to backport?

ukazap avatar Jan 24 '24 22:01 ukazap

I am not planning to backport anything to Async 1.x at this point, sorry.

ioquatix avatar Jul 17 '24 04:07 ioquatix