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.
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