|
VEX IQ C++ API
|
Use this class to create and control threads. More...
Public Member Functions | |
| thread (void(*callback)(void), size_t stack_size=1024) | |
| Creates a thread object. More... | |
| ~thread () | |
| int32_t | get_id () |
| Gets the ID of the thread. More... | |
| void | join () |
| Waits for the other thread to finish its execution. More... | |
| bool | joinable () |
| Permits the thread to execute from the thread handle. More... | |
| void | interrupt () |
| Stops the thread. More... | |
Use this class to create and control threads.
| vex::thread::thread | ( | void(*)(void) | callback, |
| size_t | stack_size = 1024 |
||
| ) |
Creates a thread object.
| callback | A reference to a function. |
| stack_size | Size of stack allocated in bytes (default 1024) |
| vex::thread::~thread | ( | ) |
| int32_t vex::thread::get_id | ( | ) |
Gets the ID of the thread.
| void vex::thread::join | ( | ) |
Waits for the other thread to finish its execution.
| bool vex::thread::joinable | ( | ) |
Permits the thread to execute from the thread handle.
Checks whether the thread is joinable.
| void vex::thread::interrupt | ( | ) |
Stops the thread.
1.8.15