7 #ifndef YARP_OS_THREAD_H
8 #define YARP_OS_THREAD_H
47 virtual void run() = 0;
56 virtual void onStop();
84 virtual void beforeStart();
91 virtual void afterStart(
bool success);
139 static int getCount();
151 static long int getKeyOfCaller();
166 int setPriority(
int priority,
int policy = -1);
189 bool join(
double seconds = -1);
197 #ifndef YARP_NO_DEPRECATED
222 #ifndef DOXYGEN_SHOULD_SKIP_THIS
225 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...
ContainerT::value_type join(typename ContainerT::const_iterator begin, typename ContainerT::const_iterator end, const typename ContainerT::value_type &separator=", ")
Utility to join the elements in a container to a single string separated by a separator.
void yield()
The calling thread releases its remaining quantum upon calling this function.
The main, catch-all namespace for YARP.