[Cubicweb] lgc.cache in cubicweb

Sylvain Thénault sylvain.thenault at logilab.fr
Fri Sep 9 16:32:17 CEST 2011


On 09 September 16:23, Aurélien Campéas wrote:
> Le 09/09/2011 15:52, Sylvain Thénault a écrit :
> >On 09 September 15:45, Aurélien Campéas wrote:
> >>>>I'm a bit surprised a lock would be needed
> >>>>there but not in the surrounding code.
> >>>
> >>>I don't get that.
> >>
> >>If the objects using these caches (repository, native source) are
> >>shared amongst threads, we may have bigger probblems. But are they ?
> >
> >they are, and are thread safe.
> 
> If they are thread safe (how is this done ?), why specifically
> protect this cache subobject ?
 
this basically is done in session which have local thread storage.
Other stuff should be either stateless or locked. Put in other words:
your cache has to be thread-safe by itself.

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org




More information about the Cubicweb mailing list