Concurrent Execution¶
The modules described in this chapter provide support for concurrent execution of code. The appropriate choice of tool will depend on the task to be executed (CPU bound vs IO bound) and preferred style of development (event driven cooperative multitasking vs preemptive multitasking). Here’s an overview:
threading
— Thread-based parallelism- Первое упоминание о совместном
multiprocessing.shared_memory
— Общая память для прямого доступа между процессами- The
concurrent
package concurrent.futures
— Launching parallel taskssubprocess
— Subprocess managementsched
— Планировщик событийqueue
— A synchronized queue classcontextvars
— Context Variables
The following are support modules for some of the above services: