Grokking Concurrency in Python
Vote

0% completed

​

Futures, Timeouts and Errors

Harvest asked a thread pool for a slow page and allowed one second for the answer. Two lines of its output show what happened next:

result(timeout=1.0) raised TimeoutError at 1.00 s the with block ended at 3.00 s

Harvest stopped waiting after one second, as written. The program still could not continue for two more seconds, because the slow download kept running in its worker thread until the site answered.

Results in Finishing Order

Build a Thread Pool called `result()

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content