We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running the given Notify - basic example (tokio 1.13.0 on MacOs 11.6), the correct output is
sending notification received notification
but more often I get only
sending notification
Joining the spawned task fixes the problem:
let join = tokio::spawn(async move { notify2.notified().await; println!("received notification"); }); println!("sending notification"); notify.notify_one(); println!("joining spawned task"); join.await.expect("spawn failed"); println!("spawned task completed");
Could be a doc or a real bug, not sure.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. This is a problem in the documentation - the spawned task is killed when main returns, so it may never get to run.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When running the given Notify - basic example (tokio 1.13.0 on MacOs 11.6), the correct output is
but more often I get only
Joining the spawned task fixes the problem:
Could be a doc or a real bug, not sure.
The text was updated successfully, but these errors were encountered: