python multiprocessing/threading cleanup
问题 I have a python tool, that has basically this kind of setup: main process (P1) -> spawns a process (P2) that starts a tcp connection -> spawns a thread (T1) that starts a loop to receive messages that are sent from P2 to P1 via a Queue (Q1) server process (P2) -> spawns two threads (T2 and T3) that start loops to receive messages that are sent from P1 to P2 via Queues (Q2 and Q3) The problem I'm having is that when I stop my program (with Ctrl+C), it doesn't quit. The server process is ended,