Overall, very nice. The key, though ultimately superficial, design question is whether to make the main methods non-static. See the comment in Scheduler.java for details.
There are a couple of other minor points. N.B. I didn't really scrutinize it for logical correctness, although the basic implementation approach makes sense. Nice use of overlays. Needs some tests soon after commit if not before. http://gwt-code-reviews.appspot.com/77820/diff/1004/1005 File user/src/com/google/gwt/core/client/Scheduler.java (right): http://gwt-code-reviews.appspot.com/77820/diff/1004/1005#newcode23 Line 23: public class Scheduler { Let's get Ray Ryan's opinion on this, but isn't The Right Thing To Do here to make the methods non-static and instead provide Scheduler.get(). That would leave the option open to make it injectible and mockable, which I could imagine being potentially useful in some testing situations. http://gwt-code-reviews.appspot.com/77820/diff/1004/1005#newcode123 Line 123: public static void schedulePause() { I'm inclined to leave this out. It's such a nice, clean API right now, and the value of this isn't proven. I know I argued that it had a reason to exist -- and it doesn in principle -- but why not let's rip it out for v1 and add it in the future if there is ever demand. The main reason I feel squirely about it is that it isn't clear which queue is getting the "pause". Sure, it's clear if you already grok the system, but it's a little hard to reason about otherwise. http://gwt-code-reviews.appspot.com/77820/diff/1004/1007 File user/src/com/google/gwt/core/client/impl/SchedulerImpl.java (right): http://gwt-code-reviews.appspot.com/77820/diff/1004/1007#newcode110 Line 110: * This is a sentinel object used to reschedule any following DeferredCommands DeferredCommands => deferred commands http://gwt-code-reviews.appspot.com/77820 --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---