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

Update documentation on block_in_place #3753

Merged
merged 3 commits into from May 5, 2021
Merged

Update documentation on block_in_place #3753

merged 3 commits into from May 5, 2021

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented May 5, 2021

This PR updates the documentation on block_in_place to fix some things that were unclear. There is already a PR that tries to address this, but I have found that the documentation needed a larger change.

Closes: #3659, #3658

@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate M-task Module: tokio/task labels May 5, 2021
@@ -6,18 +6,23 @@ cfg_rt_multi_thread! {
///
/// In general, issuing a blocking call or performing a lot of compute in a
/// future without yielding is not okay, as it may prevent the executor from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, but "is not okay" probably can be reworded to: "is problematic"

/// instead.
///
/// Note that this function can only be used when using the `multi_thread` runtime.
/// driving other tasks forward. By using this function, the executor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Calling this function informs the executor that the currently executing task is about to block the thread"

maybe? TOLI

Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one wording suggestion, but not a blocker.

@Darksonn Darksonn merged commit 7ac341b into master May 5, 2021
@Darksonn Darksonn deleted the Darksonn-patch-3 branch May 5, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-task Module: tokio/task T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants