Hi all,

The channels authentication documentation 
(https://channels.readthedocs.io/en/latest/topics/authentication.html) 
shows using the channels AuthMiddleware with an AsyncConsumer.

Now, my problem is that all session backends in Django are blocking.
I know that the user is only retrieved lazily but from what I understand 
this only means that instead of the blocking call happening during the 
instantiation of the application in daphne.Server.create_application it 
will happen in the AsyncConsumer.
Either way the call will be made in the event loop.
Are we not stopping the event loop for the first time every connection 
accesses request.user?
I'm sure I'm missing something here.

Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9a7ec05-7d54-4459-a08a-20d6a931c8a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to