Implementing a reusable adaptor type of library on top of Azure Document Db Client SDK.
The library can run anywhere, not only in an ASP.NET Core web service, but i
The continuations unlike a synchronous code which precedes an await
call, are executed in context of different call-stack calls. In particular they are scheduled for execution as separate delegates and there is no call-stack relationship between them. So specifying ConfigureAwait(false)
for very last continuation execution will take effect only for this specific continuation, other continuations will still execute using their individual scheduling configuration. That is, if your goal is to ensure not capturing a synchronization context by any continuation in your library (in order to prevent potential dead locks or any other reason) then you should configure all await
calls which have continuations with ConfigureAwait(false)
.