diff --git a/doc/AsyncLock.md b/doc/AsyncLock.md index c90b2af..c1f9270 100644 --- a/doc/AsyncLock.md +++ b/doc/AsyncLock.md @@ -1,6 +1,6 @@ ## Overview -This is the `async`-ready almost-equivalent of the `lock` keyword or the [`Mutex` type](https://docs.microsoft.com/en-us/dotnet/api/system.threading.mutex), similar to Stephen Toub's [AsyncLock](https://blogs.msdn.microsoft.com/pfxteam/2012/02/12/building-async-coordination-primitives-part-6-asynclock/). It's only _almost_ equivalent because the `lock` keyword permits reentrancy, which is not currently possible to do with an `async`-ready lock. +This is the `async`-ready almost-equivalent of the `lock` keyword or the [`Mutex` type](https://docs.microsoft.com/en-us/dotnet/api/system.threading.mutex), similar to Stephen Toub's [AsyncLock](https://blogs.msdn.microsoft.com/pfxteam/2012/02/12/building-async-coordination-primitives-part-6-asynclock/). It's only _almost_ equivalent because this does not permit reentrance like the `lock` keyword. An `AsyncLock` is either taken or not. The lock can be asynchronously acquired by calling `LockAsync`, and it is released by disposing the result of that task. `AsyncLock` taken an optional `CancellationToken`, which can be used to cancel the acquiring of the lock.