Synchronization Pattern

Category

Patterns to handle the synchronization of data between threads or processes.

Patterns

Double-Checked Locking

Synchronization Pattern

A concurrency pattern which reduces the overhead of acquiring a lock. First, the locking condition is tested without acquiring the lock. Only if this check indicates that locking is required the actual locking mechanism and the synchronized logic is executed.

Scoped Locking

Synchronization Pattern

The Scoped Locking C++ idiom ensures that a lock is acquired when control enters a scope and released automatically when control leaves the scope, regardless of the return path from the scope.

Strategized Locking

Synchronization Pattern

The Strategized Locking design pattern parameterizes synchronization mechanisms that protect a component's critical sections from concurrent access.

Thread-Safe Interface

Synchronization Pattern

The Thread-Safe Interface design pattern minimizes locking overhead and ensures that intra-component method calls do not incur `self-deadlock' by trying to reacquire a lock that is held by the component already.