MCPcopy
hub / github.com/tornadoweb/tornado / async_wrapper

Method async_wrapper

tornado/test/ioloop_test.py:544–547  ·  view source on GitHub ↗
(self_event, other_event)

Source from the content-addressed store, hash-verified

542 # run_in_executor works with await and not just gen.coroutine
543 # (simply passing the underlying concurrent future would do that).
544 async def async_wrapper(self_event, other_event):
545 return await IOLoop.current().run_in_executor(
546 None, sync_func, self_event, other_event
547 )
548
549 res = yield [async_wrapper(event1, event2), async_wrapper(event2, event1)]
550

Callers

nothing calls this directly

Calls 2

currentMethod · 0.80
run_in_executorMethod · 0.45

Tested by

no test coverage detected