Skip to main content

thread::Thread

Types

CancelState#

  • enable
  • disable

CancelType#

  • deferred
  • asynchronous

ContentionScope#

  • system
  • process

DetachState#

  • joinable
  • detached

function_t#

typedef void *(* thread::Thread::function_t) (void *) )(void *)

Type: void *(*

IsInherit#

  • no
  • yes

Policy#

using thread::Thread::Policy =  Sched::Policy 

Type: Sched::Policy

Scope#

using thread::Thread::Scope =  ContentionScope 

Type: ContentionScope

Functions

Thread()=default#

thread::Thread::Thread ()=default

Thread(const Attributes &attributes, const Construct &options)#

thread::Thread::Thread (const Attributes &attributes, const Construct &options)

Thread(const Attributes &attributes, void *argument, function_t thread_function)#

inline

thread::Thread::Thread (const Attributes &attributes, void *argument, function_t thread_function)

Thread(const Construct &options)#

explicit

thread::Thread::Thread (const Construct &options)

Thread(const Thread &thread)=delete#

thread::Thread::Thread (const Thread &thread)=delete

Thread(Thread &&a) noexcept#

inline

thread::Thread::Thread (Thread &&a) noexcept

Thread(void *argument, function_t thread_function)#

inline

thread::Thread::Thread (void *argument, function_t thread_function)

~Thread()#

thread::Thread::~Thread ()

cancel()#

inline

Thread & thread::Thread::cancel ()

Type: Thread &

cancel() const#

const Thread & thread::Thread::cancel () const

Type: const Thread &

get_sched_policy() const#

Sched::Policy thread::Thread::get_sched_policy () const

Type: Sched::Policy

get_sched_priority() const#

int thread::Thread::get_sched_priority () const

Type: int

id() const#

inline

pthread_t thread::Thread::id () const

Type: pthread_t

Details#

Gets the ID of the thread.

is_joinable() const#

inline

bool thread::Thread::is_joinable () const

Type: bool

is_running() const#

bool thread::Thread::is_running () const

Type: bool

is_valid() const#

bool thread::Thread::is_valid () const

Type: bool

Details#

Returns true if the thread has a valid id.If create() has not been called, this will return false. If there was an error creating the thread, this will also return false;

join(void **value=nullptr)#

Thread & thread::Thread::join (void **value=nullptr)

Type: Thread &

Parameters:

  • void ** value

kill(int signal_number) const#

inline

const Thread & thread::Thread::kill (int signal_number) const

Type: const Thread &

Parameters:

  • int signal_number

move()#

inline

Thread && thread::Thread::move ()

Type: Thread &&

operator=(const Thread &thread)=delete#

Thread & thread::Thread::operator= (const Thread &thread)=delete

Type: Thread &

Parameters:

operator=(Thread &&a) noexcept#

inline

Thread & thread::Thread::operator= (Thread &&a) noexcept

Type: Thread &

Parameters:

set_sched_parameters(Sched::Policy policy, int priority)#

Thread & thread::Thread::set_sched_parameters (Sched::Policy policy, int priority)

Type: Thread &

Parameters:

Static Functions

self()#

inline

static pthread_t thread::Thread::self ()

Type: pthread_t

set_cancel_state(CancelState cancel_state)#

static CancelState thread::Thread::set_cancel_state (CancelState cancel_state)

Type: CancelState

Parameters:

set_cancel_type(CancelType cancel_type)#

static CancelType thread::Thread::set_cancel_type (CancelType cancel_type)

Type: CancelType

Parameters: