The GWT timer I use in my application doesn't seem to respond to a call to cancel().
I see new server calls being fired, even after cancel() is reached.
com.google.gwt.user.client.Timer t = new com.google.gwt.user.client.Timer() {
@Override
public void run() {
myService.poll(result.getKey(), new HappyAsyncCallback<JobResult>() {
@Override
public void onSuccess(JobResult result) {
if (result.getUuid() != null && !result.getUuid().isEmpty()) {
Window.alert("Done! Cancelling...");
cancel();
}
}
});
}
};
t.scheduleRepeating(5000);
I read these similar issues, but haven't been able to use these issues to my advantage unfortunately.