3min chapter

Talk Python To Me cover image

#304: asyncio all the things with Omnilib

Talk Python To Me

CHAPTER

Synchronizing Processes With Forks

With multi threading, you could probably do 60 to 100 simultaneous network requests. But with multiprocessing instead where you have a like a process pool, and you give it a whole bunch of stuff to work on, each process is only going to work on one request at a time. So if you actually really want to saturate all your cores, now you need a whole bunch more processes. And that then has the problem of a lot of memory overhead because even if you're using copy on right semantics with forking, the problem is that Python goes and touches all the ref counts on everything.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode