SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A read/write lock for resources. More...
#include <Lock.h>
Public Member Functions | |
Lock (const Lock &)=delete | |
Lock & | operator= (const Lock &)=delete |
SMTKCORE_EXPORT void | lock (LockType) |
SMTKCORE_EXPORT bool | tryLock (LockType) |
SMTKCORE_EXPORT void | unlock (LockType) |
SMTKCORE_EXPORT LockType | state () const |
A read/write lock for resources.
This lock is designed to potentially starve readers in favor of writers. This is not necessarily bad; it means that writers are given priority over readers when there are multiple readers and writers simultaneously attempting to access the resource.