Grokking Concurrency in Python
0% completed
Sync Code Inside Async Code
Sending a blocking call to a worker thread makes one promise: the event loop keeps running its other tasks while the call runs. It makes no promise that the call finishes sooner, that any number of such calls can run at once, or that a timeout stops the call.
Harvest's async crawler relies on that promise, because its page parser calls the blocking fetch function. The crawler also indexes pages, which is CPU work, and there the missing promises matter most.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%