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

Fix race condition with cancellation tokens in Read/Flush operations #59090

Merged
merged 4 commits into from
Sep 15, 2021

Commits on Sep 14, 2021

  1. Fix race condition with cancellation tokens in Read/Write operations

    - There's a tight race where UnsafeRegister can fire inline and then ReadAsync never completes. This is because the cancellation token property has not been assigned yet so the callback noops. This change checks the result of the UnsafeRegister operation to see if ran synchronously and throws if it did. We also move any state transitions to after these checks to make sure the PipeAwaitable state doesn't change before throwing.
    davidfowl committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    5d9548e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71344e8 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. Add if debug

    davidfowl committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    a58956e View commit details
    Browse the repository at this point in the history
  2. More if DEBUG

    davidfowl committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    efb0999 View commit details
    Browse the repository at this point in the history