AsyncRewriter inserts async method calls inside code that is within a lock section, however this won't compile (Cannot await in the body of a lock statement):
lock (lockObj)
{
// can't do this inside a lock
await this.MethodAsync(cancellationToken).ConfigureAwait(false);
}
Can be worked around by using something like SemaphoreSlim instead:
AsyncRewriter inserts async method calls inside code that is within a lock section, however this won't compile (
Cannot await in the body of a lock statement
):Can be worked around by using something like
SemaphoreSlim
instead: