An updated version of AsyncLock
has just been released on GitHub and Nuget with improved support for reentrancy detection.
AsyncLock
is a async/await-native anonymous lock for .NET and .NET Core that allows safely using async/await while holding a lock, for example: