mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-19 10:58:17 +00:00
6a05a65f73
It was possible to deadlock your policy by triggering queue length/emptiness checks conurrently with the queue consumer thread. Let's make it more explicitly clear which methods cannot be used that way by making their mutex acquisition non-blocking and raise an error. In addition, let's improve the close method so that it doesn't require exclusive access to the consumer side of the queue. Provide a shutdown_logging event that can be used to explicitly close queues on shutdown, if that is appropriate for your use case.