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 < guettl...@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@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/