Task #1670
closed
Remove concept of periodic event from Scheduler
Added by Alex Afanasyev over 10 years ago.
Updated over 10 years ago.
Description
Periodic event can be implemented as a separate wrapper, but even this is not that necessary. Periodic events should be be just re-scheduled within the callback (a new event for the same callback should be created).
Benefits of having periodical events:
- the same EventId can refer to a series of events
- interval is more accurate
Rescheduling in callback is possible, but:
- EventId changes
- user code must account for time spent in the callback
Interval is never accurate, but only approximate. Precision is always depends on many parameters, including current system load.
Is there a single use case for the need to have the same EventId to refer a series of events? The same variable can be used to represent series as well. The difference is just a little bit more overhead.
There is significant complication of the scheduler code to handle both normal and periodic event.
The Scheduler itself can handle just one-off events.
A wrapper can provide periodical events (with a different EventId type, and better precision), but it's not needed at this time.
- Assignee set to Alex Afanasyev
- Start date changed from 06/16/2014 to 06/19/2014
- Status changed from New to Code review
- % Done changed from 0 to 100
I know that repo-ng uses periodic event. I will update repo-ng code before this issue is closed.
Actually, I'm wrong. repo-ng was using periodic event before, but this already has been fixed. So, I don't know any blocks for this issue.
- Status changed from Code review to Closed
Also available in: Atom
PDF