10 #ifndef YARP_OS_THREAD_H
11 #define YARP_OS_THREAD_H
50 virtual void run() = 0;
59 virtual void onStop();
87 virtual void beforeStart();
94 virtual void afterStart(
bool success);
142 static int getCount();
154 static long int getKeyOfCaller();
169 int setPriority(
int priority,
int policy = -1);
192 bool join(
double seconds = -1);
200 #ifndef YARP_NO_DEPRECATED
225 #ifndef DOXYGEN_SHOULD_SKIP_THIS
228 Private*
const mPriv;
An abstraction for a thread of execution.
virtual void threadRelease()
Release method.
void setOptions(int stackSize=0)
Set the stack size for the new thread.
virtual bool threadInit()
Initialization method.
static void setDefaultStackSize(int stackSize)
Set the default stack size for all threads created after this point.
virtual void run()=0
Main body of the new thread.
#define YARP_DEPRECATED
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
void yield()
The calling thread releases its remaining quantum upon calling this function.
The main, catch-all namespace for YARP.