Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-3009

Add missing ConfigureAwait(false) calls to reduce deadlocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2.5
    • 3.2.4
    • library
    • None
    • 1

    Description

      SDK consumers calling our async methods from synchronous code may be using risky patterns such as Task.Wait(), Task.Result, or Task.GetAwaiter().GetResult(). This can cause deadlocks if the calls are within a SynchronizationContext that limits concurrency.

      This can be mitigated by using .ConfigureAwait(false) wherever tasks are awaited, but this must be applied to the entire call stack to be truly effective. We are currently missing this in several places, and we should also try to prevent this from accidentally happening in the future.

      https://forums.couchbase.com/t/problem-on-latest-sdks/32126

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty