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

rt: fix new yield_now behavior with block_in_place #5251

Merged
merged 1 commit into from Dec 2, 2022
Merged

Commits on Dec 1, 2022

  1. rt: fix new yield_now behavior with block_in_place

    PR #5223 changed the behavior of `yield_now()` to store yielded tasks
    and notify them *after* polling the resource drivers. This PR fixes a
    couple of bugs with this new behavior when combined with
    `block_in_place()`.
    
    First, we need to avoid freeing the deferred task queue when exiting a
    runtime if it is *not* the root runtime. Because `block_in_place()`
    allows a user to start a new runtime from within an existing task, this
    check is necessary.
    
    Second, when a worker core is stolen from a thread during a
    `block_in_place()` call, we need to ensure that deferred tasks are
    notified anyway.
    carllerche committed Dec 1, 2022
    Copy the full SHA
    07aae2d View commit details
    Browse the repository at this point in the history