Open richarddd opened 9 months ago
There is currently no way to either join or cancel tasks that are spawned on the context.
It would be great if ctx.spawn returns some for of "join-handle"
ctx.spawn
I can work around this by using a https://docs.rs/tokio/latest/tokio/sync/oneshot/fn.channel.html and sending from my task but it it might be a bit better for performance and ergonomics if this capability it was supported out of the box
There is currently no way to either join or cancel tasks that are spawned on the context.
It would be great if
ctx.spawn
returns some for of "join-handle"I can work around this by using a https://docs.rs/tokio/latest/tokio/sync/oneshot/fn.channel.html and sending from my task but it it might be a bit better for performance and ergonomics if this capability it was supported out of the box