SYNCHRONIZED_DUAL

NOTE: This API is deprecated. Use lock(), wlock(), rlock() or the withLock functions instead. In the future it will be marked with a deprecation attribute to emit build-time warnings, and then it will be removed entirely.

Synopsis

Declared in <folly/Synchronized.h>

#define SYNCHRONIZED_DUAL(n1, e1, n2, e2)

Description

Synchronizes two Synchronized objects (they may encapsulate different data). Synchronization is done in increasing address of object order, so there is no deadlock risk.

Parameters

NameDescription
n1Name bound to the first object's datum.
e1The first Synchronized object.
n2Name bound to the second object's datum.
e2The second Synchronized object.