-
Notifications
You must be signed in to change notification settings - Fork 7
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
Expand on using stdin / stdout #85
Comments
Hi, |
Per discussion on discord #tokio-users, the documentation for stdin may be using the word "block" loosely. As currently written:
I am not sure if my interpretation is entirely accurate, but it might have been clearer to write:
|
On the contrary, this seems like desired behavior to me. Reads will wait (they will not block in the "blocking" sense that should be avoided in async code) for data to be available: EDIT: Accidentally pressed Ctrl+Enter. |
Currently, the `tokio::sync::RwLock` docs refer to tasks waiting to acquire a lock as "blocking". This is because these docs were copied from the `std::sync::RwLock` docs. In the past, the use of the term "blocking" to refer to causing a thread to yield [has caused confusion for users][1]. This commit changes the `RwLock` documentation to use the terms "yields" and "causing a task to yield" rather than "blocks" or "blocking a task". This should make the documentation less ambiguous, so that users don't incorrectly interpret this as stating that the use of `RwLock` will block a thread. [1]: tokio-rs/doc-push#85 (comment) Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Related: tokio-rs/tokio#709
The text was updated successfully, but these errors were encountered: