Skip to content

Commit 386526e

Browse files
authored
Merge pull request #244 from mariusz96/patch-1
Fix typo in README.md
2 parents 9d2fcca + 856cd15 commit 386526e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ using (var handle = myDistributedLock.TryAcquire())
7878

7979
`async` versions of both of these methods are also supported. These are preferred when you are writing async code since they will not consume a thread while waiting for the lock. If you are using C#8 or higher, you can also dispose of handles asynchronously:
8080

81-
### Timeouts
82-
8381
```C#
8482
await using (await myDistributedLock.AcquireAsync()) { ... }
8583
```
8684

85+
### Timeouts
86+
8787
Additionally, all of these methods support an optional `timeout` parameter. `timeout` determines how long `Acquire` will wait before failing with a `TimeoutException` and how long `TryAcquire` will wait before returning null. The default `timeout` for `Acquire` is `Timeout.InfiniteTimeSpan` while for `TryAcquire` the default `timeout` is `TimeSpan.Zero`.
8888

8989
### Cancellation

0 commit comments

Comments
 (0)