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). Heres an overview:
threadingThread-based parallelismmultiprocessingProcess-based parallelism- Introduction
- Reference
- Programming guidelines
- Examples
multiprocessing.shared_memoryShared memory for direct access across processes- The
concurrentpackage concurrent.futuresLaunching parallel tasksconcurrent.interpretersMultiple interpreters in the same processsubprocessSubprocess managementschedEvent schedulerqueueA synchronized queue classcontextvarsContext Variables
The following are support modules for some of the above services: