Talk Python To Me cover image

#385: Higher level Python asyncio with AnyIO

Talk Python To Me

00:00

Async for a Thread Pool

You write basically exactly the same code that you would write with regular open and a context manager, but the async version. Return to the pool, which is much better than craving it and throwing it away completely. If you want to loop over line for line, instead of doing a regular for loop, you can do anync for line and file and then read it asynchronously line by line. And also related to that is you have an asynchronous pathlib path.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app