he TryGuard is used to attempt to gain writer access. The constructor makes
one attempt to write-lock the mutex. Afterwards the success of such attempt
may be tested by accessing the "operator bool() const" of the TryGuard.
The following is the public interface.
class BadTryGuard: public boost::exception, public
template <class X, class Mutex>
TryGuard( volatile X& x );
TryGuard( volatile X* x );
volatile X& x, volatile const Mutex& mutex );
volatile X* x, volatile const Mutex& mutex );
All constructors throw boost::thread_resource_error. The BadTryGuard is thrown
when accessing the X while bool() is false.