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.
…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
sure. Also mentioned talking to your agents. We talked about making them more friendly, but specifically with regard to concurrency.
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…
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?
Bingo. Yeah, yeah. Yeah. All right,
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.