kopia lustrzana https://github.com/micropython/micropython-lib
asyncio: Recover eventloop's ability to work with callbacks.
Actually, coroutine support for call_soon() is a hack, in big asyncio coroutine should be wrapped in Task object.asyncio-segfault
rodzic
78fef25eea
commit
25bcef1b0d
|
@ -46,6 +46,9 @@ class EventLoop:
|
||||||
delay = t - tnow
|
delay = t - tnow
|
||||||
if delay > 0:
|
if delay > 0:
|
||||||
self.wait(delay)
|
self.wait(delay)
|
||||||
|
if callable(cb):
|
||||||
|
cb(*args)
|
||||||
|
else:
|
||||||
delay = 0
|
delay = 0
|
||||||
try:
|
try:
|
||||||
ret = next(cb)
|
ret = next(cb)
|
||||||
|
|
Ładowanie…
Reference in New Issue