BloombergLP::bslmt::ThreadUtilImpl<Platform::PosixThreads>::create

create overloads

Synopses

Declared in <bslmt_threadutilimpl_pthread.h>

Create a thread with default attributes and the given entry point.

static
int
create(
    Handle* threadHandle,
    bslmt_ThreadFunction function,
    void* userData);
» more...

Create a thread with the specified attributes and entry-point function.

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

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
threadHandlereceives an identifier for the new thread
functionentry-point function invoked by the new thread
userDatasole argument passed to function
attributesproperties for the new thread