Make an exclusive locking helper for a const object.

Synopsis

Declared in <folly/Synchronized.h>

template<
    typename D,
    typename M,
    typename... Args>
auto
lock(
    Synchronized<D, M> const& synchronized,
    Args&&... args);

Return Value

A locking helper for use with lock() or synchronized().

Parameters

Name

Description

synchronized

The object to lock.

args

Extra arguments forwarded to the locking function.

Created with MrDocs