On Apr 30, 2:52 pm, "Diez B. Roggisch" <[email protected]> wrote: > Am 30.04.2010 um 14:58 schrieb Ben Sizer: > > > In a post here dated 27 May 2009 Mark Ramm write that "TurboGears has > > been threadsafe since day one". Obviously 'threadsafe' is an ambiguous > > term and can mean a variety of things but I would guess that in this > > context it means that TurboGears executes each request in serial order > > so that they cannot interfere with each other except via the database. > > Is this a correct assumption? If not, how does TurboGears implement > > thread-safety? > > No, that is not the way it is meant. TG is thread-safe in the sense > that several threads work parallel - within the limitations of the > Python-interpreter itself (GIL). > > TG has no global state that is altered during a request/response and > thus could cause problems when several requests are processed.
Ok, thanks for the correction. I was hoping that would be the case, but was concerned about how safety could be guaranteed throughout the stack without imposing such a high-level exclusion. Are 3rd party libraries checked for such global state? And are there any known restrictions on how TG needs to be used? eg. The model's database session? Or a client's Beaker session? -- Ben Sizer -- You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en.

