Deadlock during teardown
Brought to you by:
simonjwright
If an event queue teardown occurs while the event queue is handling an event, and the event action tries to post an event on the queue, it will block at Excluder.Post[_To_Self]:
entry Post (The_Event : Event_P) when not Stopping is
This does require that the teardown preempts the dispatcher queue, but that's not at all impossible in a unit test environment.
Using the Test event queue's Wait_Until_Idle will minimise the chance of this happening.