kopia lustrzana https://github.com/micropython/micropython-lib
asyncio_micro: Work around stupid Python closures.
Which don't close variables, just variable references.pull/11/head
rodzic
0b5ca354e2
commit
1c647189f1
|
@ -69,10 +69,10 @@ class EventLoop:
|
|||
elif isinstance(ret, IORead):
|
||||
# self.add_reader(ret.obj.fileno(), lambda self, c, f: self.call_soon(c, f), self, cb, ret.obj)
|
||||
# self.add_reader(ret.obj.fileno(), lambda c, f: self.call_soon(c, f), cb, ret.obj)
|
||||
self.add_reader(ret.obj.fileno(), lambda f: self.call_soon(cb, f), ret.obj)
|
||||
self.add_reader(ret.obj.fileno(), lambda cb, f: self.call_soon(cb, f), cb, ret.obj)
|
||||
continue
|
||||
elif isinstance(ret, IOWrite):
|
||||
self.add_writer(ret.obj.fileno(), lambda f: self.call_soon(cb, f), ret.obj)
|
||||
self.add_writer(ret.obj.fileno(), lambda cb, f: self.call_soon(cb, f), cb, ret.obj)
|
||||
continue
|
||||
elif isinstance(ret, IODone):
|
||||
if ret.op == IO_READ:
|
||||
|
|
Ładowanie…
Reference in New Issue