aioeventlet

Poplar Hawk-moth (Laothoe populi), photo taken in France

aioeventlet implements the asyncio API (PEP 3156) on top of eventlet. It makes possible to write asyncio code in a project currently written for eventlet.

aioeventlet allows to use greenthreads in asyncio coroutines, and to use asyncio coroutines, tasks and futures in greenthreads: see yield_future() and wrap_greenthread() functions.

The main visible difference between aioeventlet and asyncio is the behaviour of run_forever(): run_forever() blocks with asyncio, whereas it runs in a greenthread with aioeventlet. It means that aioeventlet event loop can run in an greenthread while the Python main thread runs other greenthreads in parallel.

Table Of Contents

Event loops

Projects used by aioeventlet:

See also:

  • aiogevent: asyncio API implemented on top of gevent

  • geventreactor: gevent-powered Twisted reactor

  • greenio: Greenlets support for asyncio (PEP 3156)

  • tulipcore: run gevent code on top of asyncio