[Web-SIG] Alternative to threading.local, based on the stack
dsposx at mac.com
Tue Jul 8 21:34:44 CEST 2008
On Jul 8, 2008, at 11:45 AM, Manlio Perillo wrote:
> Using greenlets, there is always a current greenlet, so you can use
> this for local storage.
> A library function can check if there is an active greenlet, and use
> it as data key; otherwise it will use the current thread id.
Yes, this is exactly what I did in the
> However this will not work if you have an asynchronous server that
> does not make use of greenlets.
Exactly, which is why I am proposing just standardizing something that
does exactly what people use threading.local for, but whose
implementation is pluggable by the wsgi server.
More information about the Web-SIG