Closed pengi closed 6 years ago
We are aware of the issue. Currently we rely on the Python garbage collector to pick up the threads, but it can take a long time before the object is cleaned. Upon garbage collection the threads are terminated.
We are looking into adding two new methods is_alive() and terminate() to the MultiAPI wrapper to allow the user to fix this in systems where this is a problem. The terminate function will also be called explicitly in exit, so the context handler does not require any extra handling.
MultiAPI.terminate() and MultiAPI.is_alive() is available in version 9.7.0.
When using the MutliAPI, the close() doesn't clean up all threads.
Using the test code:
Results in:
threading.enumerate()
returns an increasing list of instances like:<Thread(QueueFeederThread, started daemon 123145431425024)>