ThreadSafeResource's helper class.
More...
#include <ts_resource.hpp>
template<typename T>
struct ol::ThreadSafeResource< T >::Accessor
ThreadSafeResource's helper class.
Accessor is used by ThreadSafeResource for giving exclusive access to resource. Resource is normally being kept in ThreadSafeResource object. When ThreadSafeResource::lock() is called an Accessor object is returned with exclusive access to resource. As long as Accessor is alive, resource cannot be accessed by other threads.
Constructor Constructs an Accessor which is temporary owner of locked resource. Until Accessor is destructed resource is locked and can be accessed safely by Accessor's client
Check if Accessor is valid.
Returns true when Accessor holds resource. Otherwise returns false. Only default constructor Accessor() makes it invalid. All other constructors will create a valid Accessor object.
The documentation for this struct was generated from the following file: