Delaying a timeout

About this task

The following sequence diagram shows a delayed timeout.

To schedule the delay:

Procedure

  1. The OMDelay constructor creates a delay.
  2. The set method delegates a timeout request to OMTimerManager.
  3. 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.
  4. 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.
  5. 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.
  6. The action method calls getDestination, which returns the current value of the destination attribute (an OMReactive instance).
  7. The action method calls wakeup, which resumes processing after the delay time has expired.
  8. signal() actually wakes up the thread blocking on the event flag.

Feedback