<PackageReference Include="NUnit" Version="3.5.0" />

EventQueue

public class EventQueue
Implements a queue of work items each of which is queued as a WaitCallback.
public int Count { get; }

Gets the count of items in the queue.

public EventQueue()

public Event Dequeue(bool blockWhenEmpty)

Removes the first element from the queue and returns it (or null).

public void Enqueue(Event e)

Enqueues the specified event

public void Stop()

Stop processing of the queue