Grokking Concurrency in Python
0% completed
Timeouts and Deadlines
Harvest gave every page download a time limit of 1.0 second, and the crawl of one site had a budget of 2.0 seconds. Three of the four pages took 0.9 seconds each, so no download broke its limit, and yet the crawl finished after 2.96 seconds.
Each limit worked exactly as written. The limits were set for single calls, while the budget belonged to the whole crawl, and nothing connected the two.
A Time Limit Is a Scheduled Cancellation
How Cancellation Works showed that task.cancel() raises CancelledError at the
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%