Intel® Advisor User Guide

ID 766448
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Intel® oneAPI Threading Building Blocks (oneTBB) Mutexes

With Intel® oneAPI Threading Building Blocks (oneTBB) , you can associate a mutex with a shared object to enforce mutually exclusive access to that object. A mutex is either locked or unlocked. For a thread to safely access the object:

  • The thread acquires a lock on the mutex.

  • The thread accesses the associated shared object.

  • The thread releases its lock on the mutex.

When a mutex is locked, if another thread tries to also acquire a lock on it, this second thread is stalled until