Project

General

Profile

Actions

Task #1670

closed

Remove concept of periodic event from Scheduler

Added by Alex Afanasyev over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Utils
Target version:
Start date:
06/19/2014
Due date:
% Done:

100%

Estimated time:

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).

Actions #1

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
Actions #2

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.

Actions #3

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.

Actions #4

Updated by Alex Afanasyev over 10 years ago

  • Assignee set to Alex Afanasyev
  • Start date changed from 06/16/2014 to 06/19/2014
Actions #5

Updated by Alex Afanasyev over 10 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 100
Actions #6

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.

Actions #7

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.

Actions #8

Updated by Alex Afanasyev over 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF