GWT scheduleFixedDelay method is not working when browser window is minimized


GWT scheduleFixedDelay method is not executed when the browser window is minimized. Due to the browser restricting the timer throttling.

If the set the below values in the browser It is working. But I want code to work.

dom.min_background_timeout_value_without_budget_throttling = 0 (changed from 1000)
dom.timeout.enable_budget_timer_throttling = false

Is there any other way to solve this in the GWT code ?

private void scheduleEventProcessor(){
        isSchedulerActive = true;
        Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
            public boolean execute() {
                for(int i=0; eventDataQueue.size()>0 && i<5; i++){
                    BaseData cometData = eventDataQueue.removeFirst();
                    if(cometData != null){
                        ArrayList<IClientEventListener> features = registry.getListeners(cometData.getKey());
                        if (features != null) {
                            for (IClientEventListener feature : features) {
                                try {
                                } catch (Exception e) {
                                    if(feature != null){
                                        ClientUtil.logErrorOnConsole("Exception while trying to update feature : " + feature.getName());
                isSchedulerActive = (eventDataQueue.size() > 0);
                return isSchedulerActive;
        }, 5);


Source: AngularJS Questions

Categorized as angularjs, gwt, javascript, smartgwt Tagged , , ,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us