[Python-Dev] PEP 492: What is the real goal? (original) (raw)
Jim J. Jewett jimjjewett at gmail.com
Fri May 1 23:23:57 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 492: What is the real goal?
- Next message (by thread): [Python-Dev] PEP 492: What is the real goal?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, May 1, 2015 at 4:10 PM, Guido van Rossum <guido at python.org> wrote:
On Fri, May 1, 2015 at 12:48 PM, Jim J. Jewett <jimjjewett at gmail.com> wrote:
If there are more tasks than executors, yield is a way to release your current executor and go to the back of the line. I'm pretty sure I saw several examples of that style back when coroutines were first discussed.
Could you dig up the actual references? It seems rather odd to me to mix coroutines and threads this way.
I can try in a few days, but the primary case (and perhaps the only one with running code) was for n_executors=1. They assumed there would only be a single thread, or at least only one that was really important to the event loop -- the pattern was often described as an alternative to relying on threads.
FWIW, Ron Adam's "yielding" in https://mail.python.org/pipermail/python-dev/2015-May/139762.html is in the same spirit.
You replied it would be better if that were done by calling some method on the scheduling loop, but that isn't any more standard, and the yielding function is simple enough that it will be reinvented.
-jJ
- Previous message (by thread): [Python-Dev] PEP 492: What is the real goal?
- Next message (by thread): [Python-Dev] PEP 492: What is the real goal?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]