7#ifndef YARP_OS_THREAD_H
8#define YARP_OS_THREAD_H
46 virtual void run() = 0;
55 virtual void onStop();
83 virtual void beforeStart();
90 virtual void afterStart(
bool success);
138 static int getCount();
150 static long int getKeyOfCaller();
165 int setPriority(
int priority,
int policy = -1);
188 bool join(
double seconds = -1);
196#ifndef YARP_NO_DEPRECATED
221#ifndef DOXYGEN_SHOULD_SKIP_THIS
224 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.
An interface to the operating system, including Port based communication.