-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Documentation: Improve WASM support documentation #6835
base: master
Are you sure you want to change the base?
Conversation
* don't mention a failure realizing as panic, as it might instead show as a browser runtime error, depending on the environment * Make a statement about what is to be expected, and what is considered a bug (this will have to de discussed, whether its acceptable) * Mention a few common usecases with what works and what does not. Its not complete at all, I dont have time to test every usecase, people can always extend it with their own PRs
//! Note also that if the runtime becomes indefinitely idle, it will panic | ||
//! immediately instead of blocking forever. On platforms that don't support | ||
//! Note also that if the runtime becomes indefinitely idle, that will lead to errors | ||
//! instead of blocking forever. On platforms that don't support | ||
//! time, this means that the runtime can never be idle in any way. |
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.
As far as I'm concerned, this paragraph explains why your use of LocalSet
worked, and your use of the runtime directly failed. In one case, you caused a situation where the application would block forever. With LocalSet
, your code did not trigger such a situation.
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.
So if I understand this, LocalSet doesn't block ever, only the runtimes may?
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.
It sounds like you executed the LocalSet
using a different runtime from Tokio. In that case, the difference is due to use of that other runtime.
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.
Yes. I'm just not neccessarily aware of what parts of Tokio do what precisely.
And yeah, in that case I guess I use LocalSet similar to what FuturesUnordered would do. However I can use it without managing a reference to that object myself, and potentially with other niceties
Also see #5667.