BloombergLP::bslmt::ThreadUtil::createWithAllocator

Create a thread with the specified attributes and allocator.

Synopsis

Declared in <bslmt_threadutil.h>

static
int
createWithAllocator(
    Handle* handle,
    ThreadAttributes const& attributes,
    ThreadFunction function,
    void* userData,
    bslma::Allocator* allocator);

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
handlereceives an identifier for the new thread
attributesproperties for the new thread
functionentry-point function invoked by the new thread
userDatasole argument passed to function
allocatormemory allocator used to supply memory