> > |> This lock is on the whole cache.
> > |
> > |What do you mean exactly ? It seems to me that this lock is
> > not on the
> > |cache, and it is unlocked as soon as it is not needed.
> >
> > the lock is on the cache...
>
> Not much help ;-)
> As Rickard proposed, the new lock() method should be implemented in the
> instance cache implementation. Inside this new lock() there is a wait()
that
> *is* on the cache object, but client can for example insert into the
cache.
So, currently the lock() is not on the cache? Then how does the passivation
thread acquire a lock on the cache so that it can work on it? The only way
to do this properly is to use lock() on the cache (i.e. cache.lock()) so
that all users of the cache can acquire it properly.
/Rickard