|
Honeycomb
0.1
Component-Model Framework
|
#include <Thread.h>


Public Types | |
| typedef Super::ThreadId | ThreadId |
| typedef function< void()> | Entry |
Public Member Functions | |
| Thread (const Entry &entry, int stackSize=0) | |
| Construct a thread. More... | |
| Thread (Thread &&rhs) noexcept | |
| Thread is moveable. More... | |
| virtual | ~Thread () |
| Thread & | operator= (Thread &&rhs) |
| void | start () |
| Begin execution of this thread. The entry function will be called. More... | |
| void | join () |
| Wait until thread execution is complete. More... | |
| bool | join (MonoClock::Duration time) |
| Try to join for an amount of time. Returns true if joined and thread execution is complete. More... | |
| bool | join (MonoClock::TimePoint time) |
| Try to join until a specific time. Returns true if joined and thread execution is complete. More... | |
| void | interrupt (const Exception::ConstPtr &e=new thread::Interrupted) |
| Request an interrupt in the thread. More... | |
| bool | interruptRequested () const |
| Check whether an interrupt has been requested for the thread. More... | |
| void | setPriority (int priority) |
| Set thread execution scheduling priority. More... | |
| int | getPriority () const |
| Get thread execution scheduling priority. More... | |
| ThreadId | threadId () const |
| Get the thread unique platform id. More... | |
Static Public Member Functions | |
| static Thread & | current () |
| Get the thread object of the calling thread. More... | |
| static int | concurrency () |
| Get number of threads that can be executed concurrently on the device. More... | |
Thread scheduling priority | |
Higher priority threads are favored for scheduling and will execute more often. | |
| static int | priorityNormal () |
| static int | priorityMin () |
| static int | priorityMax () |
Static Public Attributes | |
| static const ThreadId | threadIdInvalid = Super::threadIdInvalid |
| Invalid thread id. More... | |
Friends | |
| class | platform::Thread |
| template<class T > | |
| class | thread::Local |
| struct | thread::InterruptEnable |
| class | thread::priv::InterruptWait |
| void | thread::current::sleep (MonoClock::TimePoint time) |
| bool | thread::current::interruptEnabled () |
| void | thread::current::interruptPoint () |
Thread class.
| typedef function<void ()> honey::Thread::Entry |
| typedef Super::ThreadId honey::Thread::ThreadId |
| honey::Thread::Thread | ( | const Entry & | entry, |
| int | stackSize = 0 |
||
| ) |
Construct a thread.
| entry | Execution function for thread. |
| stackSize | Initial size of the thread stack in bytes. If 0 then default size is used. |
|
virtual |
|
inlinestatic |
Get number of threads that can be executed concurrently on the device.
|
inlinestatic |
Get the thread object of the calling thread.
|
inline |
Get thread execution scheduling priority.
| void honey::Thread::interrupt | ( | const Exception::ConstPtr & | e = new thread::Interrupted | ) |
Request an interrupt in the thread.
The thread will throw e the next time it waits in join(), current::sleep(), current::interruptPoint(), or Condition::wait().
| bool honey::Thread::interruptRequested | ( | ) | const |
Check whether an interrupt has been requested for the thread.
|
inline |
Wait until thread execution is complete.
|
inline |
Try to join for an amount of time. Returns true if joined and thread execution is complete.
| bool honey::Thread::join | ( | MonoClock::TimePoint | time | ) |
Try to join until a specific time. Returns true if joined and thread execution is complete.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Set thread execution scheduling priority.
| void honey::Thread::start | ( | ) |
Begin execution of this thread. The entry function will be called.
|
inline |
Get the thread unique platform id.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Invalid thread id.
1.8.10