[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MutexLock added to gc_util.h
- To: gcdev@sseos.lbl.gov
- Subject: MutexLock added to gc_util.h
- From: Henrik Nordberg <HNordberg@lbl.gov>
- Date: Tue, 16 Feb 1999 10:21:01 -0800
- Organization: Lawrence Berkeley Laboratory, Bekeley, California
Hello People,
I have added a simple class called MutexLock, to gc_util.cpp. It takes the address of a pthread mutex in the constructor, which it aquires the lock for immediatly. The lock
is released in the destructor. The idea is that all you have to do to protect a function (or block of code) with a mutex lock is to say something like:
MutexLock ml(&myMutex);
Regards, Henrik
___________________________________________________________
Henrik Nordberg <HNordberg@lbl.gov> http://nordberg.lbl.gov
Scientific Data Management Research Group
Lawrence Berkeley Laboratory