From 180ccf5898cf2bfc70e8dfb158c87f368f17e6da Mon Sep 17 00:00:00 2001 From: justcoding121 Date: Fri, 13 Apr 2018 19:05:29 -0400 Subject: [PATCH] cleanup --- EventHook/Helpers/AsyncQueue.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/EventHook/Helpers/AsyncQueue.cs b/EventHook/Helpers/AsyncQueue.cs index 7a22b69..19974b8 100644 --- a/EventHook/Helpers/AsyncQueue.cs +++ b/EventHook/Helpers/AsyncQueue.cs @@ -36,11 +36,8 @@ internal void Enqueue(T value) queue.Enqueue(value); //wake up the dequeue task with result - if (dequeueTask != null - && !dequeueTask.Task.IsCompleted) - { - dequeueTask.SetResult(true); - } + dequeueTask?.TrySetResult(true); + } ///