createWithAllocator overloads
Synopses
Declared in <bslmt_threadutil.h>
Create a thread that invokes a function object using an allocator.
template<class INVOKABLE>
static
int
createWithAllocator(
Handle* handle,
INVOKABLE const& function,
bslma::Allocator* allocator);
Create a thread that runs the specified entry‐point using an allocator.
static
int
createWithAllocator(
Handle* handle,
ThreadFunction function,
void* userData,
bslma::Allocator* allocator);
Same as the preceding overload, with the specified attributes.
template<class INVOKABLE>
static
int
createWithAllocator(
Handle* handle,
ThreadAttributes const& attributes,
INVOKABLE const& function,
bslma::Allocator* allocator);
Create a thread with the specified attributes and allocator.
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
Name |
Description |
handle |
receives an identifier for the new thread |
function |
invokable object executed as the thread entry point |
allocator |
memory allocator used to copy |
userData |
sole argument passed to |
attributes |
properties for the new thread |
Created with MrDocs