kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio.core: Optimize case of resuming coro with no args.
Don't create a new tuple with empty arguments for coro.send(), just use next(coro).pull/81/head
rodzic
37f8273715
commit
0e0fffc138
|
@ -64,11 +64,12 @@ class EventLoop:
|
|||
else:
|
||||
delay = 0
|
||||
try:
|
||||
if args == ():
|
||||
args = (None,)
|
||||
if __debug__:
|
||||
log.debug("Coroutine %s send args: %s", cb, args)
|
||||
ret = cb.send(*args)
|
||||
if args == ():
|
||||
ret = next(cb)
|
||||
else:
|
||||
ret = cb.send(*args)
|
||||
if __debug__:
|
||||
log.debug("Coroutine %s yield result: %s", cb, ret)
|
||||
if isinstance(ret, SysCall1):
|
||||
|
|
Ładowanie…
Reference in New Issue