mpr/timer.cpp File Reference
Detailed DescriptionManagement of callback timer module.
- Overview:
- The timer module allows callbacks to be scheduled for execution at arbitrary periods. The MprTimerService class manages the overall service and each timer is controlled by an instance of the Timer class. MprTimerService keeps a list of timers in unsorted order. This is generally faster than keeping a sorted list if the list is mostly empty.
Users should delete their timers. They can delete them either in their callbacks or in another thread.
- Remarks:
- This module is thread-safe and uses a single mutex in the MprTimerService. We use a per-timer inUse counters for safe Timer deletion. Users call dispose() in their callbacks rather than calling delete.
|
|