Skip to content
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

Docs for task::spawn must mention support for tasks that block #905

Closed
jimblandy opened this issue Nov 2, 2020 · 2 comments
Closed

Docs for task::spawn must mention support for tasks that block #905

jimblandy opened this issue Nov 2, 2020 · 2 comments

Comments

@jimblandy
Copy link
Contributor

jimblandy commented Nov 2, 2020

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 (it seems like a good design to me), but non-obvious characteristics covered by async-std's stability guarantees should be documented.

@Keruspe
Copy link
Member

Keruspe commented Nov 4, 2020

Actually, this behaviour was never actually merged #631

What I'm working on is an opt-in integration, disabled by default.

@jimblandy
Copy link
Contributor Author

Since this isn't going to be the default behavior, this PR's documentation isn't appropriate. Documentation should be addressed as an integral part of whatever PR does get merged.

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

Successfully merging a pull request may close this issue.

2 participants