dabeaz / thredo

Thredo was an experiment - It's dead. Feel free to look around.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Future plans

dabeaz opened this issue · comments

What are future plans for "thredo" you ask? It's hard to say... thredo originally started out being secretly contained within the Curio project. Almost all of the underlying machinery is an extension of Curio async threads. However, one downside I found having this in Curio was a sort of "conceptual head explosion" while looking at the resulting code. There were too many layers of abstraction mixed together in the same code base.

I decided to split this out to have more of a clean separation of ideas. Curio is an async-library. Everything you see there is pretty much async/await and assumes that you are programming in the async world. Thredo is a thread-library. Everything you see using thredo appears as normal synchronous code without any mention of async/await. The fact that it's implemented on top of Curio should be seen as more of an incidental detail.

In any event, for now, I'm going to keep it as a separate library. It's not a large library. I supposed there's always a chance I might fold it back into the Curio project, but for now I prefer the separation of ideas.

In the EuroPython Conference which you introduced thredo to audience in your talk named Die Threads, you said

This is not suitable for production...

Is this still the case?

Is there any plan to make it production grade?

Also, is it just me who feels like thredo has a potential to make async libraries obsolete and bring back all the joy of python programming back? Because as a newbie to python world and fascinated by the language itself, having need to choose between sync and async is really frustrating, and also hardest thing for me to grasp in python .

I think thredo is a pretty neat concept. But the reality is that with family, teaching, book writing, and other activities, it's a spare time project for me. Also, to be honest, the greater Python community hasn't really shown much interest in it. Maybe it's just too weird. Or shiny enough.

As a project, I doubt that there will ever be a "production version" at this point. If someone were to take the overall concept (async-backed threads) and adapt it to asyncio, it might be something that could grow into package beyond a concept. Maybe.