Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3815

Make SemaphoreSlimSignalable.Signal end SemaphoreSlimSignalable.WaitSignaledAsync immediately

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Unknown Unknown
    • 2.14.0
    • None
    • Internal
    • None

    Description

      As an optimization for preventing WaitSignaledAsync task execution to continue on Signal thread, cancelation was scheduled on another thread with 0ms timeout. This introduced a race condition where WaitSignaledAsync can succeed despite being signaled.

      Eliminate this race condition and prevent WaitSignaledAsync to be resumed on Signal thread.

      Attachments

        Activity

          People

            boris.dogadov@mongodb.com Boris Dogadov
            boris.dogadov@mongodb.com Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: