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 parallelism- Introduction
- Reference
- Programming guidelines
- Examples
multiprocessing.shared_memoryβ Shared memory for direct access across processes- The
concurrentpackage concurrent.futuresβ Launching parallel tasksconcurrent.interpretersβ Multiple interpreters in the same processsubprocessβ Subprocess managementschedβ Event schedulerqueueβ A synchronized queue classcontextvarsβ Context Variables
The following are support modules for some of the above services: