Example #1
0
def recvfrom(s, n):
    try:
        yield core.IORead(s)
        return s.recvfrom(n)
    except:
        # print("recv: exc, cleaning up")
        # print(uasyncio.core._event_loop.objmap, uasyncio.core._event_loop.poller)
        # uasyncio.core._event_loop.poller.dump()
        yield core.IOReadDone(s)
        # print(uasyncio.core._event_loop.objmap)
        # uasyncio.core._event_loop.poller.dump()
        raise
Example #2
0
def close(s):
    yield core.IOReadDone(s)
    s.close()