asyncio - Integration with asyncio

Asyncio compatibility functions.

eventlet.asyncio.spawn_for_awaitable(coroutine)

Take a coroutine or some other object that can be awaited (asyncio.Future, asyncio.Task), and turn it into a GreenThread.

Known limitations:

  • The coroutine/future/etc. don’t run in their own greenlet/GreenThread.

  • As a result, things like eventlet.Lock won’t work correctly inside async functions, thread ids aren’t meaningful, and so on.