Runs asyncio coroutines in a thread, exposes the results as duet futures.

This lets us bridge between an asyncio event loop (which is what async grpc code uses) and duet (which is what cirq uses for asynchrony).



View source

Dispatch the given function to be run in an asyncio coroutine.

func asyncio function which will be run in a separate thread. Will be called with *args and **kw and should return an asyncio awaitable.
*args Positional args to pass to func.
**kw Keyword args to pass to func.