Re: ZPT thread-safety

Dieter Maurer <[email protected]>
Newsgroups gmane.comp.web.zope.page-templates
Message-ID <[email protected]>
Sasa Milosavljevic wrote at 2005-5-9 20:55 +0000:
>I developing a zope application as Zope product.
>My GUI is based on ZPT.
>All page templates are instances of PageTemplateFile class,
>and all of them are  class attributes of product classes.
>So in one time  many threads from thread pool may work with same ZPT 
>instance.
>Are zpt instances  as class attributes thread-safe solution?

Yes.

While they may write to their attributes (which may in general be a problem),
these attributes are only used as a cache. If a different thread
perform the same write, it missed an optimization but otherwise
nothing bad happened.

-- 
Dieter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.