Minimizes locking overhead and ensures that intracomponent methods do not self-deadlock, by trying to reacquire a lock already held.
The abstract classclass LOCK { public: virtual void acquire() = 0; virtual void release() = 0; };
Marco Corvi - Page hosted by geocities.com.template < class LOCK > class Component { public: // public interface methods which acquire/release the LOCK // and call internal methods void insert( const string & str ); private: // internal methods performing the processing void insert_i( const string & str ); private: mutable LOCK lock_; };