10 namespace platform {
class Thread; }
19 typedef honey::platform::Thread Thread;
24 static LocalStore&
create(Thread& thread);
26 static void destroy();
28 static LocalStore& inst();
32 static pthread_key_t _key;
36 namespace current {
namespace platform
38 inline void yield() { pthread_yield_np(); }
39 inline void pause() {}
48 typedef thread::platform::LocalStore LocalStore;
49 friend struct thread::platform::LocalStore;
51 Thread(
bool external,
int stackSize);
55 Thread& operator=(Thread&& rhs);
57 static Thread& current();
62 static int priorityNormal();
63 static int priorityMin();
64 static int priorityMax();
65 void setPriority(
int priority);
66 int getPriority()
const;
69 static const ThreadId threadIdInvalid = 0;
70 ThreadId threadId()
const {
return _id; }
72 static int concurrency() {
static int ret = concurrency_priv();
return ret; }
77 static Thread* createExt();
78 static void* entry(
void* arg);
79 static int concurrency_priv();
84 UniquePtr<honey::Mutex> _lock;
void yield()
Give up this thread's time slice to allow other threads to execute.
Definition: Thread.h:52
void pause()
Perform a no-op without giving up this thread's time slice. This no-op momentarily frees resources fo...
Definition: Thread.h:54
std::enable_if< std::is_default_constructible< Com >::value &&!std::is_abstract< Com >::value, Component & >::type create()
Called by registry to create a component. May be specialized for a component type.
Definition: Component.h:75
Global Honeycomb namespace.