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);

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

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

Same as the preceding overload, with the specified attributes.

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

Same as the preceding overload, using the specified attributes.

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

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

handle

receives an identifier for the new thread

function

invokable object executed as the thread entry point

userData

sole argument passed to function

attributes

properties for the new thread

Created with MrDocs