LLVM thread following std::thread interface with added constructor to specify stack size.

Synopsis

Declared in <llvm/Support/thread.h>

class thread;

Type Aliases

Name

Description

id

Platform‐specific thread identifier type.

native_handle_type

Native OS handle type for the underlying thread.

start_routine_type

Function pointer type for the platform thread entry routine.

Member Functions

Name

Description

thread [constructor]

Constructors

~thread [destructor]

Destroys the thread handle; calls std::terminate if still joinable.

operator=

Move‐assigns from Other; terminates if this thread is still joinable.

detach

Separates the thread of execution from this object.

get_id

Returns the id of the thread represented by this object.

join

Blocks until the thread of execution finishes.

joinable

Returns true if this object represents an active, joinable thread.

native_handle

Returns the native handle for this thread.

swap

Exchanges the underlying thread handles of this object and Other.

Static Member Functions

Name

Description

ThreadProxy

Platform thread entry that runs the callable in Ptr.

hardware_concurrency

Returns an estimate of concurrent threads supported by the hardware.

Static Data Members

Name

Description

DefaultStackSize

Default stack size in bytes for new threads; nullopt means platform default.

Created with MrDocs