-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove code relating to parallel execution from PeriodicalExecuter. #23
base: master
Are you sure you want to change the base?
Conversation
…nd other code relating to parallel execution.
@@ -12,24 +12,4 @@ new Test.Unit.Runner({ | |||
this.assertEqual(3, peEventCount); | |||
}); | |||
}, | |||
|
|||
testOnTimerEventMethod: function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't seem like this was performing any function that the previous test wasn't already doing, given that currentlyExecuting
was removed.
(ping) |
Mind merging or closing? |
I'm guessing they've given up over here |
That's sad. Is there a a canonical fork? I don't use the library anymore, but I think lots do. Sent from my thumbs. On Mar 1, 2012, at 7:15 PM, Cecil [email protected] wrote:
|
Sorry — we dropped the ball on pull requests for a while. Can I ask why you think the code relating to parallel execution is unnecessary? I'm confused. It looks quite necessary to me if the point is to prevent an accumulation of callbacks in the case where your callback routinely takes longer than the interval. If your point is that JavaScript is single-threaded and thus nothing actually executes in "parallel," then I'll concede that it's a poor choice of words. Just want to make sure I'm not missing something here. |
HAHAHA DISREGARD THAT (now I see your point) Just shows how little this code has been touched over the years. Yeah, it doesn't prevent callback accumulation, and it's quite silly of us to have pretended that it did. So I have four options, as I see it:
I am leaning towards option #4 because we can't get rid of |
In PeriodicalExcuter, removed unnecessary
currentlyExecuting
ivar and other code relating to parallel execution.Since
#onTimerEvent
contained no logic after this change, madesetInterval
call (a bound)#execute
and renamed#registerCallback
to#start
so that the timer can be restarted at will. This behavior already existed in the previous (undocumented) function.Thanks!