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

SafeSocketHandle: avoid potential blocking of finalizer thread #41508

Merged
merged 10 commits into from
Sep 1, 2020

Commits on Aug 28, 2020

  1. SafeSocketHandle: avoid potential blocking of finalizer thread

    When the Socket is Disposed, it attempts to make all on-going operations
    abort. It does this in a loop, and decides there are no on-going operations
    when the reference count becomes zero and the handle gets released.
    
    SafePipeHandle holds a reference to SafeSocketHandle. This prevents the
    reference count to drop to zero, and causes the dispose to loop infinitly.
    
    When the Socket is disposed from the finalizer thread, it is no longer used
    for operations and we can skip the loop. This avoids blocking the finalizer
    thread when the reference count can't drop to zero.
    tmds committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    6d85a49 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccc41c9 View commit details
    Browse the repository at this point in the history
  3. Add test

    tmds committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    8c41150 View commit details
    Browse the repository at this point in the history
  4. PR feedback

    tmds committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    43874bb View commit details
    Browse the repository at this point in the history
  5. Fix test

    tmds committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    99de1e5 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. PR feedback

    tmds committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    16e62fa View commit details
    Browse the repository at this point in the history
  2. Refactor

    tmds committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    b88432f View commit details
    Browse the repository at this point in the history
  3. Refactor

    tmds committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    c52ab27 View commit details
    Browse the repository at this point in the history
  4. Log call to _handle.Dispose

    tmds committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    ec7b055 View commit details
    Browse the repository at this point in the history
  5. Handle null handle

    tmds committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    a44fe82 View commit details
    Browse the repository at this point in the history