-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Use web_task for cancellable wasm tasks
#21795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
766f966 to
9104443
Compare
9104443 to
59cdbb9
Compare
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
|
Okay I wrote a basic release note. Let me know if I should change anything. Also @NthTensor, do you want to be added as an author? (you did most of the work anyway) |
|
@NthTensor I see you took out any support for wasm multithreading. What happens if you try to compile with multithreading enabled right now? Send and Sync seem to be implemented unconditionally for the Wrapper while it's conditional in wasm-bindgen-futures. What still needs to be done to |
|
Thanks for submitting this. I'd just like to add some context here, for other reviewers. ContextBevy's executor is largely built around Under the hood, calling This happens to be incredibly well aligned with the model of execution needed by So Current StatusThis PR integrates The only caveat is that If reviewers would prefer, I'd be willing to transfer ownership of |
NthTensor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I would also recommend adding a migration guide that explains that dropping a Task is now significant on the web, and task.detach() must be called to preserve the previous behavior.
Let me see if I remember. I believe there may be an issue when sending a waker to a different thread for a
I'm not exactly sure what the next steps are here tbh. Probably porting over the more complex queue from wasm-bindgen-futures |
4c05c6a to
667153b
Compare
667153b to
9e66482
Compare
|
Fixed the non-american spelling in the release note and added a migration guide |
Objective
web-taskcrate so tasks can use the normal cancel semantics on the web.Solution
web_task::spawn_local(future)insingle_threaded_task_pool.rs.Testing
I ran all of the async tasks examples locally and via wasm and they behaved identically.