Refactor interceptors etc. to support async.

This commit is contained in:
Christian Kratky
2018-12-27 22:41:41 +01:00
parent 38f2453c92
commit c0507fcc55
33 changed files with 537 additions and 311 deletions
+1 -1
View File
@@ -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.