MCPcopy Create free account
hub / github.com/EasyIME/PIME / async_wrapper

Method async_wrapper

python/python3/tornado/test/ioloop_test.py:554–557  ·  view source on GitHub ↗
(self_event, other_event)

Source from the content-addressed store, hash-verified

552 # run_in_executor works with await and not just gen.coroutine
553 # (simply passing the underlying concurrent future would do that).
554 async def async_wrapper(self_event, other_event):
555 return await IOLoop.current().run_in_executor(
556 None, sync_func, self_event, other_event
557 )
558
559 res = yield [async_wrapper(event1, event2), async_wrapper(event2, event1)]
560

Callers

nothing calls this directly

Calls 2

currentMethod · 0.80
run_in_executorMethod · 0.45

Tested by

no test coverage detected