On 2017-09-23 10:45, Antoine Pitrou wrote:
Hi Eric,
On Fri, 22 Sep 2017 19:09:01 -0600
Eric Snow <ericsnowcurren...@gmail.com> wrote:
Please elaborate. I'm interested in understanding what you mean here.
Do you have some subinterpreter-based concurrency improvements in
mind? What aspect of CSP is the PEP following too faithfully?
See below the discussion of blocking send()s :-)
As to "running_interpreters()" and "idle_interpreters()", I'm not sure
what the benefit would be. You can compose either list manually with
a simple comprehension:
[interp for interp in interpreters.list_all() if interp.is_running()]
[interp for interp in interpreters.list_all() if not interp.is_running()]
There is a inherit race condition in doing that, at least if
interpreters are running in multiple threads (which I assume is going
to be the overly dominant usage model). That is why I'm proposing all
three variants.
An alternative to 3 variants would be:
interpreters.list_all(running=True)
interpreters.list_all(running=False)
interpreters.list_all(running=None)
[snip]
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com