by zackelan · 8y ago · 0 comments
This means that the "frontend" of a service can be asyncio, allowing it to support features like WebSockets that are non-trivial to support without aiohttp or a similiar asyncio-native HTTP server [2], while the "backend" of the service can be multi-threaded or multi-process for CPU-bound work.
0: https://docs.python.org/3/library/asyncio-eventloop.html#exe...
1: https://docs.python.org/3/library/asyncio-eventloop.html#asy...
2: Flask-SocketIO, for example, requires that you use eventlet or gevent, which are the "legacy" ways of doing asynchronous IO: https://flask-socketio.readthedocs.io/en/latest/
No comments yet.