Mutexes

Mutexes provide mutual exclusion of tasks from sections of code.

In general, strive for designs that minimize the use of explicit locking, because it can lead to serial bottlenecks. If explicit locking is necessary, try to spread it out so that multiple tasks usually do not contend to lock the same mutex.

Get Intel Threading Building Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.