he WriterGuard is used to remove volatileness and simultaneously gain access
to the entire interface of the shared object. It performs exclusive locking of
the mutex exposed by the shared object.
The following is the public interface of the WriterGuard.
template <class X,class Mutex>
WriterGuard( volatile X& x );
WriterGuard( volatile X* x );
volatile X& x, volatile const Mutex& mutex );
volatile X* x, volatile const Mutex& mutex );
All constructors throw boost::thread_resource_error. All other functions do
See the section (
) for an example.