- changed status to invalid
Clean queues and connections (pipes)
The client has a lot of queues and pipes (connection-pairs) that help distribute information between threads. To ensure all resources are properly cleaned up, we should close them properly.
For all queues, the consumers (calling get
) should use the task_done
function indicate they handled the item in the queue. Then all the producers (and possibly the main thread) can call join
to make sure they wait properly for all tasks to finish. This will lead to hanging processes and threads if not done properly which might help with finding hidden issues here.
For connections, both sides should close them and catch exceptions if the other side closed it (likely meaning there is a shutdown so they should react/check accordingly). This will also help to find issues.
Comments (1)
-
reporter - Log in to comment
We use asyncio now