Re: Threads and requests with Channels 2.0

2018-03-20 Thread Andrew Godwin
Hi Jonathan, Daphne runs a single asyncio event loop in the main thread which services all protocol handling (low-level HTTP and websocket) and Channels-level async-native code (ASGI middleware, routing, async consumers). Any synchronous calls (e.g. methods on synchronous consumers) are queued up

Threads and requests with Channels 2.0

2018-03-20 Thread Jonathan Stray
Can anyone offer a brief account of how Channels uses threads to service multiple requests? My understanding is that there are multiple workers, and I imagine each is a thread which can handle one request (Django view-style request) at a time. Is this correct? I also don't quite understand how