Grokking Concurrency in Python
0% completed
The Trouble With Gather and Loose Tasks
Harvest's crawl reported a failure after 0.10 seconds, and the caller moved on with an empty index. One tenth of a second later, page 0 appeared in the index anyway. Pages 1 and 3 followed. A second page failed as well, and that error was never reported anywhere.
The program starts five fetches with asyncio.gather, the call most asyncio code uses to run several coroutines and wait for all of them. The surprise comes from what gather does when one of them fails.
What gather Does
**`asyncio.gather(*aws)
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%