mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Refactor interceptors etc. to support async.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace MQTTnet.Tests
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
threads[i] = Task.Run(async () =>
|
||||
{
|
||||
using (var releaser = await @lock.LockAsync(CancellationToken.None))
|
||||
using (var releaser = await @lock.WaitAsync(CancellationToken.None))
|
||||
{
|
||||
var localI = globalI;
|
||||
await Task.Delay(10); // Increase the chance for wrong data.
|
||||
|
||||
Reference in New Issue
Block a user