diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-10-05 09:12:04 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-10-05 09:12:04 -0500 |
| commit | 85d99db5f390af5df211101fa83ce256bb16ba95 (patch) | |
| tree | 75670f8559f14edd6d3a7dcb2946e433732796cf /src/slskd/Common | |
| parent | b38d9f01862b4fc27874bf99d4b24b53a6577bd0 (diff) | |
| download | slskd-85d99db5f390af5df211101fa83ce256bb16ba95.tar.gz | |
run continuations async
Diffstat (limited to 'src/slskd/Common')
| -rw-r--r-- | src/slskd/Common/TokenBucket.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Common/TokenBucket.cs b/src/slskd/Common/TokenBucket.cs index 11d64b88..440f25ae 100644 --- a/src/slskd/Common/TokenBucket.cs +++ b/src/slskd/Common/TokenBucket.cs @@ -92,7 +92,7 @@ namespace slskd /// </summary> public class TokenBucket : ITokenBucket, IDisposable { - private TaskCompletionSource<bool> waitForReset = new(); + private TaskCompletionSource<bool> waitForReset = new(TaskCreationOptions.RunContinuationsAsynchronously); /// <summary> /// Initializes a new instance of the <see cref="TokenBucket"/> class. @@ -243,6 +243,6 @@ namespace slskd } private void Reset() - => Interlocked.Exchange(ref waitForReset, new TaskCompletionSource<bool>()).SetResult(true); + => Interlocked.Exchange(ref waitForReset, new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously)).SetResult(true); } } |
