The
following
sequence diagram shows a
delayed timeout.
To schedule the delay:
Procedure
The OMDelay constructor
creates a delay.
The set method
delegates
a timeout request to OMTimerManager.
The delay waits until the timeout is over,
at which point the timeTickCbk method (private) is
called. The timeTickCbk method increments m_Time,
the accumulated or current time.
The timeTickCbk method
calls post (private) to get the
next scheduled timeout request from the heap, trim the heap, and move
the timeout to the matured list.
The action method
sends
a matured timeout request to the relevant thread, where it is then
inserted into the event queue for the thread. Because
the timeout is a delay (isNotDelay = False), the
thread is the receiver.
The action method
calls getDestination,
which returns the current value of the destination attribute
(an OMReactive instance).
The action method calls wakeup,
which resumes processing after the delay time has expired.
signal() actually wakes
up the thread blocking on the event flag.