BloombergLP::bslmt::ThreadUtil::createWithAllocator

Same as the preceding overload, with the specified attributes.

Synopsis

Declared in <bslmt_threadutil.h>

template<class INVOKABLE>
static
int
createWithAllocator(
    Handle* handle,
    ThreadAttributes const& attributes,
    INVOKABLE const& function,
    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
functioninvokable object executed as the thread entry point
allocatormemory allocator used to copy function