Improve performance.

This commit is contained in:
Christian Kratky
2020-11-13 20:33:47 +01:00
parent cc405c3e90
commit d0a848c8b4
18 changed files with 201 additions and 171 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ namespace MQTTnet.Tests
var @lock = new AsyncLock();
for (var i = 0; i < 100; i++)
{
using (await @lock.WaitAsync().ConfigureAwait(false))
using (await @lock.WaitAsync(CancellationToken.None).ConfigureAwait(false))
{
sum++;
}
@@ -33,7 +33,7 @@ namespace MQTTnet.Tests
var @lock = new AsyncLock();
// This call will never "release" the lock due to missing _using_.
await @lock.WaitAsync().ConfigureAwait(false);
await @lock.WaitAsync(CancellationToken.None).ConfigureAwait(false);
using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(3)))
{