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

EventPump

public class EventPump : IDisposable
EventPump pulls events out of an EventQueue and sends them to a listener. It is used to send events back to the client without using the CallContext of the test runner thread.
public string Name { get; set; }

Gets or sets the name of this EventPump (used only internally and for testing).

public EventPumpState PumpState { get; set; }

Gets or sets the current state of the pump

public EventPump(ITestListener eventListener, EventQueue events)

Constructor

public void Dispose()

Dispose stops the pump Disposes the used WaitHandle, too.

public void Start()

Start the pump

public void Stop()

Tell the pump to stop after emptying the queue.