Originally Posted by
ISAWHIM
Quick example of a stack expire...
You look at the last time the RUN was called... (Lets say it was 5 minutes ago.)
Event 1 missed 4 calls, but has an expire of 4 min... so stack has no "Event 1" in it...
Event 2 missed 4 calls, and has no expire, but has a stack limit of 2, Event 2 stacks 2 (3 min ago),(1 min ago)
Event 3 missed 8 calls, and has no expire, but has a stack of 8... This is a little more complex...
The whole stack is limited to 6, so...
Going backwards in time, you take the last 6 calls.
(Event 2 @ 3 min) gets dropped...
(Event 3 @...) gets dropped...
Which leaves 1 for event 2, and 5 for event 3.
Now, when this fires, since there are none ready to fire... they are fired one call each, from the oldest in the list. (The new ones will be there on the next call, or may have expired by then. If you do the new calls first, the old calls may expire, and be lost, even though they could have been used.
This call...
2 and 3
next call...
3
next call...
3
etc...
Not...
2, 3, 3, 3, 3, 3 (Fired all at once)
Since this is a "Rationing" tool, and multiple calls to the same function may just cause further delays. Better to have them expire, and be handled once time is free, on the next call of RUN.
Bookmarks