Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Threads, Async Await and Goroutines

Checkout calls a payment provider for every order, and the provider takes about a second to answer. At the busiest hour, 1,000 of those calls are waiting at the same time. The same 1,000 calls were written in three ways: with Python threads, with Python async/await, and in Go. Each program reported how many operating system threads it used while the calls waited:

Output:

threads 1,000 calls waiting 1,001 OS threads resident 32 MB all done in 1.13 s async/await 1,000 calls waiting 1 OS threads resident 27 MB all done in 1.11 s

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content