Why does my Python thread with subprocess not work as expected?
问题 I have the following subtle problem: The Python code starts two threads, each creating a subprocess call to an exexutable (in fact written in C). The first executable is passed the argument 10000, meaning a delay of 10s before its exits. Similar for the second executable, but with a delay of 20s. I observe, that worker1 and worker 2 do their printouts at the same time, namely after 20s, the longer of both delays. Why is wait() for worker1 somehow "blocked" by the longer delay of the other?