Skip to content

Make Python 3.13 coroutines work with multithreading automatically like Goroutines does and some like go keyword for later. #119061

@jefer94

Description

@jefer94

Feature or enhancement

Proposal:

I'd been reading the new features of Python 3.13 and I don't remember that this point was mentioned, I think that it's important to make sure that our coroutines would apply optimizations automatically as Goroutines does, I mean, I just write go and it is managed in many threads at the same time, I think that something similar to asyncio.run should do it.

I'm proposing for Python 3.14 or later something like go keyword for Python, I am not saying that we must use the keyword go but should be fine to have something so easy to use like this. The go keyword executes a function in multiple threads automatically.

With "it works with multithreading automatically" I mean that if I keep full in every moment the event loop it must use my CPU at 100%, and now with Python 3.12 with GIL it is impossible

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/have-there-some-like-goroutines-in-python-3-13-or-maybe-3-14/53346

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions