addThread overloads

Synopses

Declared in <bslmt_threadgroup.h>

Begin executing the specified invokable functor in a new thread, using the optionally specified thread attributes. Return 0 on success, and a non‐zero value otherwise. INVOKABLE shall be a copy‐constructible type having the equivalent of void operator()(). Note that threads are always created joinable, regardless of the mode specified in attributes.

template<class INVOKABLE>
int
addThread(INVOKABLE const& functor);

Begin executing the specified invokable functor in a new thread, using the specified thread attributes. Return 0 on success, and a non‐zero value otherwise. INVOKABLE shall be a copy‐constructible type having the equivalent of void operator()(). Note that threads are always created joinable, regardless of the mode specified in attributes.

template<class INVOKABLE>
int
addThread(
    INVOKABLE const& functor,
    ThreadAttributes const& attributes);

Created with MrDocs