On Tue, Apr 8, 2008 at 2:14 PM, Ben Bangert <[EMAIL PROTECTED]> wrote:
>
> On Apr 8, 2008, at 12:57 PM, Mike Orr wrote:
>
>
> > We say pylons.g data is shared between thread, but that pylons.g is a
> > StackedObjectProxy so it's "thread-safe and middleware-safe".  But
> > those two are contradictory.  Either "g" is shared between threads, in
> > which case it must be modified in a thread-safe manner, or it's
> > thread-local, in which case thread safety doesn't matter.  Which is
> > it?
> >
> > If pylons.g is shared between threads, where does one put thread-local
> > data in Pylons?
> >
>
>  In their own object. Stashing something in request.environ would work.

request.environ is request scope, so it wouldn't work for stuff that
needs to persist between requests.  Like a connection to a Durus
daemon, which has to be thread local.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to