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

Make SemaphoreSlimSignalable.Signal end SemaphoreSlimSignalable.WaitSignaledAsync immediately

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 2.14.0
    • Affects Version/s: None
    • Component/s: Internal
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: