Skip to content

Docs for task::spawn must mention support for blocking execution #904

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

Closed
jimblandy opened this issue Nov 2, 2020 · 1 comment
Closed

Comments

@jimblandy
Copy link
Contributor

The async-std blog post
"stop worrying about async blocking"
explains that spawn_blocking is no longer needed, and that developers should simply use spawn instead and let the library decide whether it should keep the thread in the async pool.

If task::spawn is the recommended way to spawn tasks that may block, then users will write code that depends on that, and the design decision becomes something async-std can't revert without introducing bugs in its users. This is all fine (I support the decision), but non-obvious characteristics covered by async-std's stability guarantees should be documented.

@jimblandy
Copy link
Contributor Author

Sorry - this is a dup of #905. GitHub gave me a strange error when I filed this, so I just blundered onwards...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant