You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QueueFeederThread not Joined when Controller Exists #53
Currently in many tests there are unjoined threads, after running the tests. Many of them are QueueFeederThread that are part of the multiprocessing.Queue implementation. I suggest we close them somewhere with:
We'll need to add explicit shutdown functions to all our classes that create such objects and make sure to call them throughout the hierarchy. Kind of a pita but without RAII there's not much you can do to work around this. We'll probably want to move the creation of these queues out of the controller somewhere that already deals with application lifetime. We'll need that later anyways so we can actually use multiple processes. It'll probably end up - in wrapped form - where we currently setup the backend/shutdown stuff.
Beyond precisely controlling the life-time what we can also investigate is why exactly they aren't joined on shutdown. I'd assume python guarantees us to call __del__ on them during shutdown so the issue is probably that they don't force a join there. If that is the case adding that on the queue itself might be enough to resolve the issue.
Activity
hacst commentedon Jan 11, 2015
We'll need to add explicit shutdown functions to all our classes that create such objects and make sure to call them throughout the hierarchy. Kind of a pita but without RAII there's not much you can do to work around this. We'll probably want to move the creation of these queues out of the controller somewhere that already deals with application lifetime. We'll need that later anyways so we can actually use multiple processes. It'll probably end up - in wrapped form - where we currently setup the backend/shutdown stuff.
Beyond precisely controlling the life-time what we can also investigate is why exactly they aren't joined on shutdown. I'd assume python guarantees us to call
__del__on them during shutdown so the issue is probably that they don't force a join there. If that is the case adding that on the queue itself might be enough to resolve the issue.