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

Support nested block_in_place #2409

Merged
merged 5 commits into from
Apr 16, 2020
Merged

Support nested block_in_place #2409

merged 5 commits into from
Apr 16, 2020

Conversation

jonhoo
Copy link
Sponsor Contributor

@jonhoo jonhoo commented Apr 16, 2020

This enables nested calls to block_in_place by removing an overly aggressive debug_assert.

It is a precursor to what would be needed for #2327.

Specifically, exiting when we are not in the entered state should not be
considered an error. This modifies `enter::exit` so that the caller
_can_ check this if they wish.
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, thanks 👍

@jonhoo jonhoo merged commit 67c4cc0 into master Apr 16, 2020
@jonhoo jonhoo deleted the block-in-block branch April 16, 2020 20:40
@Darksonn Darksonn added A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-blocking Module: tokio/task/blocking labels Apr 20, 2020
@Darksonn
Copy link
Contributor

Should this go on the release notes for next version?

@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Apr 20, 2020

@Darksonn hmm, probably not in isolation, but with #2410 I think it should. I'll add the relnotes label there.

jonhoo added a commit to mit-pdos/noria that referenced this pull request Apr 25, 2020
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 C-enhancement Category: A PR with an enhancement or bugfix. M-blocking Module: tokio/task/blocking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants