+ public static void add(Task t) { singleton.runnable.append(t); }
+ public static void init() { singleton.run(); }
+
+
+ // API which must be supported by subclasses /////////////////////////////////////
+
+ protected Scheduler() { }
+
+ /**
+ * INVARIANT: all scheduler implementations MUST invoke
+ * Surface.renderAll() after performing a Task if no tasks remain
+ * in the queue. A scheduler may choose to invoke
+ * Surface.renderAll() more often than that if it so chooses.
+ */
+ public void run() { defaultRun(); }
+
+
+ // Default Implementation /////////////////////////////////////