[Python-ideas] Preemptive multitasking and asyncio
Mark E. Haase
mehaase at gmail.com
Thu Jan 25 09:37:12 EST 2018
Explicit yield points makes reasoning about multitasking much easier. The
author of Twisted wrote an excellent post about this. I agree that the
Python documentation doesn't do justice to the question, "when should I use
asyncio instead of threads?"
On Thu, Jan 25, 2018 at 2:37 AM, Thomas Güttler <
guettliml at thomas-guettler.de> wrote:
> Am 24.01.2018 um 17:59 schrieb Steven D'Aprano:
>> On Wed, Jan 24, 2018 at 05:46:29PM +0100, Thomas Güttler wrote:
>>> I found a question and answer at Stackoverflow which says
>>> that asyncio/await is like cooperative multitasking.
>>> My whish is to have preemptive multitasking: The interpreter
>>> does the yielding.
>> Isn't that what threading and multiprocessing do?
> Hmmm, yes, you are right.
> I guess I have not understood something up to now.
> If async/await is the answer. What was the question?
> AFAIK it can help to solve the c10k problem.
> If I don't have the c10k problem, then what is the benefit of async/await?
> If it is only about IO, there are python bindings for libraries like libuv.
> I guess this whole topic is too ...(I am missing the right term here)...
> average developers like me.
> Thomas Güttler
> Thomas Guettler http://www.thomas-guettler.de/
> I am looking for feedback: https://github.com/guettli/pro
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas