Skip to content

Commit

Permalink
Make sure to use CompleteAdding to complete event threads that have…
Browse files Browse the repository at this point in the history
… no additional events to handle.
  • Loading branch information
Tkael committed Jun 3, 2024
1 parent 0607f6b commit a346d5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions VoiceAttackResponder/VoiceAttackEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private static void dequeueEvents ( BlockingCollection<Event> eventQueue, ref dy
if ( eventQueue.Count == 0 )
{
// If the event queue is empty then we can complete and clean up the associated consumer task.
eventQueue.CompleteAdding();
return;
}
}
Expand Down

0 comments on commit a346d5d

Please sign in to comment.