[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/locking/ commit simple locking package

Brian Lloyd brian at zope.com
Thu Feb 3 14:04:13 EST 2005


'More appropriate' is in the eye of the beholder ;) Internally,
we debated that and came down to the current approach based on
a) a lot of application experience and b) the fact that is
easy for anyone to do an alternative implementation if they
want to. By design, the _only_ thing that cares about where
locks are stored is the implementation itself.


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com


> -----Original Message-----
> From: Stephan Richter [mailto:srichter at cosmos.phy.tufts.edu]
> Sent: Thursday, February 03, 2005 2:00 PM
> To: zope3-checkins at zope.org
> Cc: Brian Lloyd
> Subject: Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/app/locking/
> commit simple locking package
>
>
> On Thursday 03 February 2005 13:20, Brian Lloyd wrote:
> > +class LockingAdapter(object):
> > +    """
> > +    Default ILockable adapter implementation.
> > +    """
> > +
> > +    zope.interface.implements(ILockable)
> > +    
> > +    def __init__(self, context):
> > +        try:
> > +            self.storage = getUtility(ILockStorage, context=context)
> > +        except ComponentLookupError:
> > +            self.storage = getUtility(ILockStorage)
> > +        self.context = context
>
> Mmh, it would seem more appropriate to use annotations for
> locking, no? You
> could still have a lock tracker that listens to LockCreated and
> LockReleased
> events.
>
> Regards,
> Stephan
> --
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
> Web2k - Web Software Design, Development and Training
>



More information about the Zope3-Checkins mailing list