Task #1670
closedRemove concept of periodic event from Scheduler
100%
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).
Updated by Junxiao Shi over 10 years ago
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
Updated by Alex Afanasyev over 10 years ago
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.
Updated by Junxiao Shi over 10 years ago
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.
Updated by Alex Afanasyev over 10 years ago
- Assignee set to Alex Afanasyev
- Start date changed from 06/16/2014 to 06/19/2014
Updated by Alex Afanasyev over 10 years ago
- Status changed from New to Code review
- % Done changed from 0 to 100
Updated by Alex Afanasyev over 10 years ago
I know that repo-ng uses periodic event. I will update repo-ng code before this issue is closed.
Updated by Alex Afanasyev over 10 years ago
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.
Updated by Alex Afanasyev over 10 years ago
- Status changed from Code review to Closed