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 parallelismmultiprocessingβ Process-based parallelismmultiprocessing.shared_memoryβ Provides shared memory for direct access across processes- The
concurrentpackage concurrent.futuresβ Launching parallel taskssubprocessβ Subprocess managementschedβ Event schedulerqueueβ A synchronized queue classcontextvarsβ Context Variables
The following are support modules for some of the above services: