folly::wlock

wlock overloads

Synopses

Declared in <folly/Synchronized.h>

Helper functions that should be passed to either a lock() or synchronized() invocation, these return implementation defined structs that will be used to lock the synchronized instance appropriately.

template<
    typename D,
    typename M,
    typename... Args>
auto
wlock(
    Synchronized<D, M>& synchronized,
    Args&&... args);
» more...

Make an exclusive locking helper for a const object.

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

Return Value

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

Parameters

NameDescription
synchronizedThe object to lock.
argsExtra arguments forwarded to the locking function.