DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
434 stars 59 forks source link

Cancel or Join spawned tasks #220

Open richarddd opened 9 months ago

richarddd commented 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"

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