asyncio - 集成 asyncio¶
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 aGreenThread.Known limitations:
The coroutine/future/etc. don't run in their own greenlet/
GreenThread.As a result, things like
eventlet.Lockwon't work correctly insideasyncfunctions, thread ids aren't meaningful, and so on.