Good day!
Interested in a little strange, probably for many, the obvious question of multiprocessing. There is an application on CPython that creates and manages several instances of classes derived from multiprocessing.Process .
Suppose that a situation has arisen, as in this diagram. Four processes are performed in parallel at a given time. The fifth, sixth, seventh are waiting for their turn. Everything is peaceful, quiet and then EXTREMELY the process "Process # 2" decides to take a short nap by passing the command time.sleep (1) . So Process # 2 pauses execution for 1 second.
Question. What will happen during sleep? Process # 2 : Core # 2 will be busy with one of the queue processes or stupidly idle, waiting for the completion of sleep Process # 2 ?
UPD : sample code