diff --git a/doc/mutex.html b/doc/mutex.html index 6a97b3f7..4fb13efe 100644 --- a/doc/mutex.html +++ b/doc/mutex.html @@ -1,159 +1,129 @@ -
- - - - -|
- |
-
-
- Boost.Threads- -mutex
- |
-
Introduction
- Header
- Class mutex Synopsis
- Class mutex Members
- Class try_mutex Synopsis
- Class try_mutex Members
- Class timed_mutex Synopsis
- Class timed_mutex Members
- Example
The mutex, try_mutex and timed_mutex classes define full
- featured models of the Mutex,
+
+
+
|
+ |
+
+ Boost.Threads+Header <boost/thread/mutex.hpp>+ |
+
mutexmutex synopsismutex constructors and
+ destructortry_mutextry_mutex synopsistry_mutex constructors
+ and destructortimed_mutextimed_mutex
+ synopsistimed_mutex constructors
+ and destructorThe mutex, try_mutex and timed_mutex classes define full featured
+ models of the Mutex, TryMutex, and TimedMutex concepts. These types
- should be used to non-recursively synchronize access to shared
- resources. For recursive locking mechanics, see TimedMutex concepts. These types should
+ be used to non-recursively synchronize access to shared resources. For recursive
+ locking mechanics, see recursive mutexes.
Each class supplies one or more typedefs for lock types which model - matching lock concepts. For the best possible performance you should - use the mutex class that supports the minimum set of lock types that - you need.
- -| Mutex Class | - -Lock name | - -Implementation defined Lock Type | - -Lock Concept | -|||||||||||||||||||||||
- mutex |
-
- scoped_lock |
-
-
- boost::Each class supplies one or more typedefs for lock types which model matching
+ lock concepts. For the best possible performance you should use the mutex class
+ that supports the minimum set of lock types that you need.
+
The mutex, try_mutex and timed_mutex - classes use an Unspecified locking strategy, so - attempts to recursively lock them or attempts to unlock them by threads - that don't own a lock on them result in undefined behavior. - This strategy allows implementations to be as efficient as possible on - any given platform. It is, however, recommended that implementations - include debugging support to detect misuse when NDEBUG is not - defined. - -Like all the Boost.Threads mutex - models, the mutex, try_mutex and - timed_mutex leave the scheduling policy as - Unspecified. Programmers should assume that threads waiting for a - lock on objects of these types acquire the lock in a random order, even - though the specific behavior for a given platform may be different. - -Header--#include <boost/thread/mutex.hpp> -- - Class mutex Synopsis+ | ScopedLock + ScopedTryLock + ScopedTimedLock |
+
The mutex, try_mutex and timed_mutex
+ classes use an Unspecified locking
+ strategy, so attempts to recursively lock them or attempts to unlock them
+ by threads that don't own a lock on them result in undefined behavior.
+ This strategy allows implementations to be as efficient as possible on any given
+ platform. It is, however, recommended that implementations include debugging
+ support to detect misuse when NDEBUG is not defined.
Like all the Boost.Threads mutex models,
+ the mutex, try_mutex and timed_mutex
+ leave the scheduling policy
+ as Unspecified. Programmers should assume that threads waiting
+ for a lock on objects of these types acquire the lock in a random order, even
+ though the specific behavior for a given platform may be different.
mutex{{class overview text}}
+mutex synopsis
namespace boost
{
@@ -169,40 +139,32 @@ namespace boost
mutex();
~mutex();
};
-}
+};
-
- mutex constructors and
+ destructor- mutex(); +mutex();- -
Postconditions: *this is in the unlocked
- state.
*this is in an unlocked state.- ~mutex(); +~mutex();- -
Requires: *this is in the unlocked state.
Effects: Destroys *this.
Dangers: Destruction of a locked mutex is a serious - programming error resulting in undefined behavior such as a program - crash.
-*this is in an unlocked sate.try_mutex{{class overview text}}
+try_mutex synopsis
namespace boost
{
- class try_mutex : private boost::noncopyable // Exposition only.
+ class try_mutex : private boost::noncopyable // Exposition only.
// Class try_mutex meets the NonCopyable requirement.
{
@@ -215,40 +177,32 @@ namespace boost
try_mutex();
~try_mutex();
};
-}
+};
-
- try_mutex constructors
+ and destructor- try_mutex(); +try_mutex();- -
Postconditions: *this is in the unlocked
- state.
*this is in an unlocked state.- ~try_mutex(); +~try_mutex();- -
Requires: *this is in the unlocked state.
Effects: Destroys *this.
Dangers: Destruction of a locked mutex is a serious - programming error resulting in undefined behavior such as a program - crash.
-*this is in an unlocked sate.timed_mutex{{class overview text}}
+timed_mutex synopsis
namespace boost
{
- class timed_mutex : private boost::noncopyable // Exposition only.
+ class timed_mutex : private boost::noncopyable // Exposition only.
// Class timed_mutex meets the NonCopyable requirement.
{
@@ -263,36 +217,25 @@ namespace boost
timed_mutex();
~timed_mutex();
};
-}
+};
-
- timed_mutex constructors
+ and destructor- timed_mutex(); +timed_mutex();- -
Postconditions: *this is in the unlocked
- state.
*this is in an unlocked state.- ~timed_mutex(); +~timed_mutex();- -
Requires: *this is in the unlocked state.
Effects: Destroys *this.
Dangers: Destruction of a locked mutex is a serious - programming error resulting in undefined behavior such as a program - crash.
-*this is in an unlocked sate.
#include <boost/thread/mutex.hpp>
@@ -339,21 +282,19 @@ int main(int, char*[])
return 0;
}
-
- The output is:
+The output is:
count == 1 count == 2 count == 3 count == 4-
Revised - 05 November, 2001
- -© Copyright - William E. Kempf 2001 all rights reserved.
- +Revised + + 05 November, 2001 + +
+© Copyright William E. Kempf 2002. All Rights + Reserved.
+