mutex Class

Summary

Class that models Mutex Concept using underlying OS locks.

Syntax

class mutex;

Header

#include "tbb/mutex.h"

Description

A mutex models the Mutex Concept. It is a wrapper around OS calls that provide mutual exclusion. The advantages of using mutex instead of the OS calls are:

  • Portable across all operating systems supported by Intel® Threading Building Blocks.

  • Releases the lock if an exception is thrown from the protected region of code.

Members

See Mutex Concept.

See Also

For more complete information about compiler optimizations, see our Optimization Notice.