Chapter 10. Concurrency with Processes, Threads, and Coroutines

Python includes sophisticated tools for managing concurrent operations using processes and threads. Even many relatively simple programs can be made to run faster by applying techniques for running parts of the job concurrently using these modules.

subprocess (page 535) provides an API for creating and communicating with secondary processes. It is especially good for running programs that produce or consume text, since the API supports passing data back and forth through the standard input and output channels of the new process.

The signal (page 553) module exposes the Unix signal mechanism for sending events to other processes. The signals are processed asynchronously, usually by ...

Get The Python 3 Standard Library by Example, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.