src/share/classes/java/util/concurrent/Executor.java

Print this page

        

@@ -77,13 +77,13 @@
  * Many <tt>Executor</tt> implementations impose some sort of
  * limitation on how and when tasks are scheduled.  The executor below
  * serializes the submission of tasks to a second executor,
  * illustrating a composite executor.
  *
- * <pre>
+ *  <pre> {@code
  * class SerialExecutor implements Executor {
- *     final Queue&lt;Runnable&gt; tasks = new ArrayDeque&lt;Runnable&gt;();
+ *   final Queue<Runnable> tasks = new ArrayDeque<Runnable>();
  *     final Executor executor;
  *     Runnable active;
  *
  *     SerialExecutor(Executor executor) {
  *         this.executor = executor;

@@ -107,11 +107,11 @@
  *     protected synchronized void scheduleNext() {
  *         if ((active = tasks.poll()) != null) {
  *             executor.execute(active);
  *         }
  *     }
- * }</pre>
+ * }}</pre>
  *
  * The <tt>Executor</tt> implementations provided in this package
  * implement {@link ExecutorService}, which is a more extensive
  * interface.  The {@link ThreadPoolExecutor} class provides an
  * extensible thread pool implementation. The {@link Executors} class