July 2007
Intermediate to advanced
332 pages
10h 4m
English
mutex Class — Class that models the Mutex Concept using underlying OS locks.
#include "tbb/mutex.h"class mutex;
A mutex models the Mutex Concept. It is a wrapper around OS calls that provide mutual exclusion. Here are the advantages of using a mutex instead of the OS calls:
The mutex class is portable across all operating systems supported by Intel Threading Building Blocks.
The mutex releases the lock if an exception is thrown from the protected region of code.
See Table 7-2.