Context variables are natively supported in asyncio
and are ready to be used without any extra configuration. For example, here is a simple echo server, that uses a context variable to make the address of a remote client available in the Task that handles that client:
From my understanding, as of Tornado 5.0 asyncio is used automatically when available (python 3.5+), so that should mean that contextvars are properly handled (context switched automatically) correct?
On Wednesday, August 15, 2018 at 10:28:10 PM UTC-4, Michael Robellard wrote:I have successfully moved one of my Tornado based projects over to Python 3.7 and was wondering if there were any thoughts or ideas of including contextvars in Tornado itself.From looking at the documentation for contextvars, It appears that I can use it even without built-in support for it in Tornado, but I was wondering if anyone had any plans for it.Thanks,Mike
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.