Goktug Gokdogan has posted comments on this change.
Change subject: Adds Timer#isRunning().
......................................................................
Patch Set 2:
(3 comments)
....................................................
File user/src/com/google/gwt/user/client/Timer.java
Line 110: throw new IllegalArgumentException("must be non-negative");
it makes sense to do schedule(0) (i.e. do asap after this event loop) and
there is already a lot of code using that.
On the other hand, a '0' interval is probably a bad idea but might be still
a valid value; I'm not sure.
If you feel strongly about it, please create a bug so that we can
discuss/evaluate accepting "0" in setInterval there.
Line 151:
This was intended and semantically correct; timer is fired out and not
running any more.
Also in practice, if we don't do that user cannot schedule the timer again
from the timer callback, which is pretty common.
....................................................
File user/test/com/google/gwt/user/client/TimerTest.java
Line 86: // Issue
https://code.google.com/p/google-web-toolkit/issues/detail?id=8101
Actually, previous code was not reproducing the problem.
I removed the counter and the tests were still passing; just busy waiting
doesn't seem like forcing them to be fired in the same event loop however
if there are scheduled to be fired exactly at the same time, the problem
gets reproduced.
That is the reason that I re-implemented the test case.
(I have searched about it, and examples I've seen were using a similar
approach to reproduce the issue.)
--
To view, visit https://gwt-review.googlesource.com/3321
To unsubscribe, visit https://gwt-review.googlesource.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0133c64de75d5d95cff863c5ab950d474dda0c56
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: Goktug Gokdogan <gok...@google.com>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@gwtproject.org>
Gerrit-HasComments: Yes
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.