FRI-OS
Classes | Public Types | Public Member Functions | List of all members
thread_attr Class Reference

Wrapper around POSIX thread attributes. More...

#include <frios/posix/threads/thread_attr.hpp>

Classes

struct  init_error
 Exception class for thread attribute initialization errors. More...
 

Public Types

enum  detach_state : int {
  detached = PTHREAD_CREATE_DETACHED,
  joinable = PTHREAD_CREATE_JOINABLE
}
 Thread detach state enumeration. More...
 

Public Member Functions

 thread_attr (void)
 Default construction of the thread attributes. More...
 
 thread_attr (thread_attr &&tmp)
 Thread attributes are moveable.
 
 ~thread_attr (void)
 Releases any resources associated with the thread attributes.
 
detach_state get_detach_state (void) const
 Gets the detach state set in the attributes.
 
void set_detach_state (detach_state state)
 Sets the detach state of the thread.
 

Detailed Description

Wrapper around POSIX thread attributes.

Thread attributes are used by the constructor of thread and they allow to specify various options for the newly created thread

Member Enumeration Documentation

enum detach_state : int
strong

Thread detach state enumeration.

Enumerator
detached 

the thread should be started as detached

joinable 

the thread should be started as joinable

Constructor & Destructor Documentation

thread_attr ( void  )

Default construction of the thread attributes.

Exceptions
init_error

The documentation for this class was generated from the following file: