BloombergLP::bslmt::ThreadUtil::create

create overloads

Synopses

Declared in <bslmt_threadutil.h>

Create a thread that invokes the specified function object.

template<class INVOKABLE>
static
int
create(
    Handle* handle,
    INVOKABLE const& function);
» more...

Create a thread that runs the specified entry-point function.

static
int
create(
    Handle* handle,
    ThreadFunction function,
    void* userData);
» more...

Same as the preceding overload, with the specified attributes.

template<class INVOKABLE>
static
int
create(
    Handle* handle,
    ThreadAttributes const& attributes,
    INVOKABLE const& function);
» more...

Same as the preceding overload, using the specified attributes.

static
int
create(
    Handle* handle,
    ThreadAttributes const& attributes,
    ThreadFunction function,
    void* userData);
» more...

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
handlereceives an identifier for the new thread
functioninvokable object executed as the thread entry point
userDatasole argument passed to function
attributesproperties for the new thread