Skip to content

Commit

Permalink
Optimization Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Simnico99 committed Feb 22, 2023
1 parent 852f11d commit 30eb682
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ZirconNet.WPF/Dispatcher/BufferedThreadDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public sealed class BufferedThreadDispatcher
private readonly Queue<Action> _queue = new(25);
private readonly object _queueLock = new();
private readonly Thread _uiThread;
private readonly TaskCompletionSource<object?> _taskCompletionSource = new();

private BufferedThreadDispatcher()
{
Expand All @@ -35,7 +34,7 @@ private async void ProcessQueue()
{
var timer = new Timer(_ => ExecuteQueuedActions(), null, 0, (int)Delay.TotalMilliseconds);

await _taskCompletionSource.Task;
await Task.Delay(Timeout.Infinite);
}

private void ExecuteQueuedActions()
Expand Down

0 comments on commit 30eb682

Please sign in to comment.