Add missing ConfigureAwait(false) calls to reduce deadlocks

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

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created November 13, 2021 at 3:06 PM
Updated November 23, 2021 at 8:26 PM
Resolved November 23, 2021 at 8:26 PM
Instabug