April 2019
Intermediate to advanced
646 pages
16h 48m
English
Before we see how to inject threads or processes in to an asynchronous event loop, we will take a closer look at the concurrent.futures module that will later be the main ingredient of our so-called workaround.
The most important classes in the concurrent.futures module are Executor and Future.
Executor represents a pool of resources that may process work items in parallel. This may seem very similar in purpose to classes from the multiprocessing module—Pool and dummy.Pool—but it has a completely different interface and semantics. It is a base class not intended for instantiation and has the following two concrete implementations: