Scheduler Class Reference

#include <Scheduler.h>

Inheritance diagram for Scheduler:

Inheritance graph
[legend]
Collaboration diagram for Scheduler:

Collaboration graph
[legend]

List of all members.


Detailed Description

The Scheduler class is responsible for firing timers and joining ended threads.

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.

The documentation for this class was generated from the following files:

Generated on Sat Oct 4 21:30:30 2008 for Mace Library by  doxygen 1.5.5