[Python-ideas] PEP draft - Composable futures for reactive programming
Andrew Barnert
abarnert at yahoo.com
Sun Dec 22 06:50:36 CET 2013
Even OS/2 can't do thousands of threads, so if you want to write a server with one thread per client (or two) you'd still need green threads.
Meanwhile, Windows, Linux, and OS X all have pretty fast thread startup and decent schedulers, but the need for a static-sized stack still means you can't do thousands even on today's computers--especially in 32 bit land (which is depressingly still common on Windows).
Sent from a random iPhone
On Dec 21, 2013, at 20:25, Chris Angelico <rosuav at gmail.com> wrote:
> On Sun, Dec 22, 2013 at 3:01 PM, Guido van Rossum <guido at python.org> wrote:
>> On Sat, Dec 21, 2013 at 7:53 PM, Chris Angelico <rosuav at gmail.com> wrote:
>>> On Sun, Dec 22, 2013 at 2:45 PM, Guido van Rossum <guido at python.org> wrote:
>>>> To cut through that you'd have to have
>>>> some kind of stack-swapping coroutine implementation like gevent...
>>>
>>> Forgive the stupid question, but how is stack-swapping during blocking
>>> calls materially different from threads?
>>
>> It's also known as "green threads". The gevent folks and the Stackless
>> folks (and a few others) do this and claim it is vastly superior to OS
>> threads.
>
> Gotcha. I grew up on OS/2 where the threading was lean and mean, so I
> just used it. I'd be mildly curious to know how different
> implementations of threads compare, and how many of them actually
> warrant a "lighter-weight thread" feature like this, but for something
> that aims to be cross-platform, I can see the value in doing it.
>
> ChrisA
> _______________________________________________
> 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/
More information about the Python-ideas
mailing list