#include <Scheduler.h>
Threads in Mace should be started using the runNewThread or runNewThreadClass macros. They then call shutdownJoinThread() and joinThread(), allowing the Scheduler to properly join each of them.
The Scheduler remains one of the tricky pieces of code to get right. Finding new bugs in the (relatively short and simple) schedule has been common.
Definition at line 64 of file Scheduler.h.
Static Public Member Functions | |
static void | haltScheduler () |
tells the schedule thread to join all remaining threads and shutdown. Then this thread waits to join the scheduler thread. | |
static bool | simulated () |
returns whether or not the scheduler is simulated | |
Static Public Attributes | |
static const uint64_t | CLOCK_RESOLUTION = 1000 |
1ms, the assumed smallest sleep period | |
Friends | |
class | TimerHandler |
void | _runNewThread (pthread_t *t, func f, void *arg, pthread_attr_t *attr, const char *fname, bool joinThread) |
Generally you should not use this directly. Exceptions are if you don't want joinThread or if you want to specify a different string. | |
void | _runNewThreadClass (pthread_t *t, RunThreadClass *c, classfunc f, void *arg, pthread_attr_t *attr, const char *fname, bool joinThread) |
Generally you should not use this directly. Exceptions are if you don't want joinThread or if you want to specify a different string. |