kopia lustrzana https://github.com/micropython/micropython-lib
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
rodzic
8f08257512
commit
62fbfa9965
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue