Open harlowja opened 10 years ago
See https://github.com/python-zk/kazoo/actions/runs/8173423920/job/22345909472#step:7:14581
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
Possibly still a subject here
Instead of spawning an arbitrary number of threads in the sequential threading handler allow for there to be a upper limit on the number of threads spawned (perhaps using a worker pool to handle these spawns) so that those threads can correctly be cleaned up when a handler is stopped. Right now those threads are spawned as daemon threads and never reclaimed, creating a hard/impossible to cleanup number of spawned threads.