Skip to content

Commit 75735c9

Browse files
authored
Update README.md
1 parent f66f25d commit 75735c9

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
@@ -18,9 +18,9 @@ var d1 = await asyncLock.ReaderLockAsync("123");
1818
d1.Dispose();
1919

2020
//set timeout
21-
using CancellationTokenSource cancellationToken = new CancellationTokenSource(TimeSpan.FromSeconds(10));
21+
using CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
2222

2323
//acquire writer lock
24-
using var d2 = await asyncLock.WriterLockAsync("123", cancellationToken.Token);
24+
using var d2 = await asyncLock.WriterLockAsync("123", cts.Token);
2525

2626
```

0 commit comments

Comments
 (0)