I'm unable to reproduce this now, but a one point running examples/test_send.py would hang rather than exiting. My theory is that it's because the stream destructor waits for the writer thread to make forward progress, but if the thread pool gets stopped first by the atexit handler, then it can't make progress.
The fix will probably be to give stream an exit_stopper that flushes and waits in the same way as stream::~stream.
I'm unable to reproduce this now, but a one point running
examples/test_send.py
would hang rather than exiting. My theory is that it's because the stream destructor waits for the writer thread to make forward progress, but if the thread pool gets stopped first by the atexit handler, then it can't make progress.The fix will probably be to give stream an exit_stopper that flushes and waits in the same way as
stream::~stream
.