<div dir="ltr">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: <a href="https://emptysqua.re/blog/grok-the-gil-fast-thread-safe-python/">https://emptysqua.re/blog/grok-the-gil-fast-thread-safe-python/</a> or the PyCon talk: <a href="https://www.youtube.com/watch?time_continue=150&v=7SSYhuk5hmc">https://www.youtube.com/watch?time_continue=150&v=7SSYhuk5hmc</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 10:46 AM, Thomas Güttler <span dir="ltr"><<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found a question and answer at Stackoverflow[1] which says<br>
that asyncio/await is like cooperative multitasking.<br>
<br>
My whish is to have preemptive multitasking: The interpreter<br>
does the yielding. The software developer does not need to<br>
insert async/await keywords into its source code any more.<br>
<br>
AFAIK the erlang interpreter does something like this.<br>
<br>
I guess it is impossible to implement this, but it was<br>
somehow important for me to speak out my which.<br>
<br>
What do you think?<br>
<br>
Regards,<br>
  Thomas Güttler<br>
<br>
<br>
[1] <a href="https://stackoverflow.com/questions/38865050/is-await-in-python3-cooperative-multitasking" rel="noreferrer" target="_blank">https://stackoverflow.com/ques<wbr>tions/38865050/is-await-in-<wbr>python3-cooperative-multitaski<wbr>ng</a><span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Thomas Guettler <a href="http://www.thomas-guettler.de/" rel="noreferrer" target="_blank">http://www.thomas-guettler.de/</a><br>
I am looking for feedback: <a href="https://github.com/guettli/programming-guidelines" rel="noreferrer" target="_blank">https://github.com/guettli/pro<wbr>gramming-guidelines</a><br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br>
</font></span></blockquote></div><br></div>