Sauce-0.10.1
A C++ Dependency Injection Framework
|
Facility to create opaque RAII guards, intended to be synchronization lockers. More...
#include <sauce/internal/locker_factory.h>
Public Member Functions | |
virtual sauce::auto_ptr< Lock > | createLock ()=0 |
Facility to create opaque RAII guards, intended to be synchronization lockers.
Since lockers usually need access to a long-lived mutex, support for passing an opaque reference on construction is provided. RAII being what it is, ownership of the locker is passed out to the caller via an auto_ptr.
This formulation is specifically chosen to cater to boost/thread's approach to RAII lockers. Specifically, a lock_guard used with a mutex should be sufficient for all needs.
|
inlinevirtual |