|
RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
|
#include <LRUCache.h>
Public Member Functions | |
| void | lock () |
| void | unlock () |
Null or noop lock class that is the default synchronization used in lru cache.
a simple pthread based lock would look like this:
class MutexLock : public Lock {
public:
MutexLock() { ::pthread_mutex_init(&m_lock, 0); }
virtual ~MutexLock() { ::pthread_mutex_destroy(&m_lock); }
void lock() { ::pthread_mutex_lock(&m_lock); }
void unlock() { ::pthread_mutex_unlock(&m_lock); }
private:
pthread_mutex_t m_lock;
}
1.8.6