On Sep 7, 2010, at 11:06 PM, Graham Dumpleton wrote:
> 
>> and b) if not, is there another approach that might work better? That is, 
>> some other approach to thread-local storage that would work with Apache 
>> threads.
> 
> The alternate approach to using threading.local() is to bind the per
> request data to the request object itself. This is actually the more
> traditional approach, although it does presume that all code which
> needs access to your data has access to the request object.

Thanks. My original plan was to do something like that, where the web2py 
request object is already thread-safe. The problem was it wasn't universally 
accessible, so I'd have to pass it around. threading.local will work well for 
me; all I need is one reference, and it will be explicitly initialized on each 
request.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to