Closing the queue before its destination can otherwise cause a deadlock,
because the destination can be stuck in a write.
This causes TestQueue to fail because it expects all events to get written to the sink, but by (correctly) closing the sink before the queue, that ends up not being the case. I'm not sure whether this PR is the right approach.
Closing the queue before its destination can otherwise cause a deadlock, because the destination can be stuck in a write.
This causes TestQueue to fail because it expects all events to get written to the sink, but by (correctly) closing the sink before the queue, that ends up not being the case. I'm not sure whether this PR is the right approach.