CA Christopher Ariza On Talk Python To Me

“Agents generally, in Python, I found them to be serial first. But even in Rust, a language that has excellent multi-threaded support and libraries, I find the agents to be serial first. … You really need to prod them and say, hey, use Rayon to make this loop multi-threaded, and it'll do it.”

Talk Python To Me · Hands-On Engineering Podcasts · November 2026

“Agents generally, in Python, I found them to be serial first. But even in Rust, a language that has excellent multi-threaded support and libraries, I find the agents to be serial first. … You really need to prod them and say, hey, use Rayon to make this loop multi-threaded, and it'll do it.” — Christopher Ariza, Talk Python To Me

Context

Asked about working with coding agents on concurrent code. Agents default to sequential code even where good parallel tools exist, and have to be told to parallelize.

Transcript

Talk Python To Me Around 56:37 into the episode
Christopher Ariza

…we just didn't have access to before. And so, yeah, I think you're exactly right. Library authors and maintainers can start to integrate multi-threaded routines into standard operations and have good confidence that their users on whatever system they're running are going to get good results. For

Michael Kennedy

sure. Also mentioned talking to your agents. We talked about making them more friendly, but specifically with regard to concurrency.

Christopher Ariza

Yeah. So this is one of my favorite points is that, you know, I had a that agents generally in Python, I found them to be serial first, but even in Rust, a language that has excellent multi-threaded support and libraries have, I find the agents to be serial first. An example in Python is a situation where you're downloading a bunch of files in a loop. This is the classic example of where Python threading has always been effective. And you may not want to write that little additional code to make it free-threaded, but if you just select that code and say, hey, make this free-threaded, your agent will do it. But it takes looking at the code, realizing it's serial, and then asking. And then on the Rust side, libraries like Rayon provide really awesome, high-level tools to, for example, if you have a loop that's computing, doing a bunch of work on each iteration of that loop, Rayon gives you very nice, high-level utilities to make those work units multi-threaded. And again, I find that the agents don't reach for that first. You really need to prod them and say, hey, use Rayon…

Michael Kennedy

That's fair. That's fair. Most of the time, this threading will be great. Except for when your program just doesn't respond and it has zero CP usage and you're just like, why? What is happening here?

Christopher Ariza

Bingo. Yeah, yeah. Yeah. All right,

Michael Kennedy

Chris. Well, that's probably what we got time to cover. Give people some advice on adopting free-threaded Python, what we got to look forward to in the next couple of years.

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

More from Talk Python To Me