June 2017
Beginner to intermediate
274 pages
6h 49m
English
There is a pair of functions in the concurrent.futures package that let's wait on several futures at once. They're called wait and as_completed. The following code example represents the wait function:

The wait function waits until all the futures are ready to deliver the results or until a timeout expires. Then, it returns a set of futures that are done and a set of futures that aren't. In contrast, the as_completed function returns an iterator that produces futures one by one as they become ready to produce the results.
In rare cases, the done and result methods of future and the wait and as_completed ...
Read now
Unlock full access