[Python-ideas] Preemptive multitasking and asyncio

Nick Timkovich prometheus235 at gmail.com
Wed Jan 24 12:01:10 EST 2018

If I'm understanding correctly, the interpreter already does this with
threads. About every 15 milliseconds the interpreter will stop a thread and
see if there are any others to work on, see "Grok the GIL," blog:
https://emptysqua.re/blog/grok-the-gil-fast-thread-safe-python/ or the
PyCon talk: https://www.youtube.com/watch?time_continue=150&v=7SSYhuk5hmc

On Wed, Jan 24, 2018 at 10:46 AM, Thomas Güttler <
guettliml at thomas-guettler.de> wrote:

> I found a question and answer at Stackoverflow[1] which says
> that asyncio/await is like cooperative multitasking.
> My whish is to have preemptive multitasking: The interpreter
> does the yielding. The software developer does not need to
> insert async/await keywords into its source code any more.
> AFAIK the erlang interpreter does something like this.
> I guess it is impossible to implement this, but it was
> somehow important for me to speak out my which.
> What do you think?
> Regards,
>   Thomas Güttler
> [1] https://stackoverflow.com/questions/38865050/is-await-in-
> python3-cooperative-multitasking
> --
> Thomas Guettler http://www.thomas-guettler.de/
> I am looking for feedback: https://github.com/guettli/pro
> gramming-guidelines
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180124/04a66230/attachment.html>

More information about the Python-ideas mailing list