uasyncio.core: Add yield call to remove coro from scheduling.

yield False won't reschedule current coroutine to be run again. This is
useful when coro is put on some waiting queue (and is similar to what
yield IORead/yield IOWrite do).
pull/222/merge
Paul Sokolovsky 2017-10-28 02:13:50 +03:00
rodzic 8f08257512
commit 62fbfa9965
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -116,6 +116,9 @@ class EventLoop:
elif ret is None:
# Just reschedule
pass
elif ret is False:
# Don't reschedule
continue
else:
assert False, "Unsupported coroutine yield value: %r (of type %r)" % (ret, type(ret))
except StopIteration as e: