--- a/jdk/src/share/classes/java/util/concurrent/Executor.java Wed Dec 01 13:01:53 2010 -0800
+++ b/jdk/src/share/classes/java/util/concurrent/Executor.java Wed Dec 01 21:46:52 2010 +0000
@@ -79,37 +79,37 @@
* serializes the submission of tasks to a second executor,
* illustrating a composite executor.
*
- * <pre>
+ * <pre> {@code
* class SerialExecutor implements Executor {
- * final Queue<Runnable> tasks = new ArrayDeque<Runnable>();
- * final Executor executor;
- * Runnable active;
+ * final Queue<Runnable> tasks = new ArrayDeque<Runnable>();
+ * final Executor executor;
+ * Runnable active;
*
- * SerialExecutor(Executor executor) {
- * this.executor = executor;
- * }
+ * SerialExecutor(Executor executor) {
+ * this.executor = executor;
+ * }
*
- * public synchronized void execute(final Runnable r) {
- * tasks.offer(new Runnable() {
- * public void run() {
- * try {
- * r.run();
- * } finally {
- * scheduleNext();
- * }
- * }
- * });
- * if (active == null) {
- * scheduleNext();
+ * public synchronized void execute(final Runnable r) {
+ * tasks.offer(new Runnable() {
+ * public void run() {
+ * try {
+ * r.run();
+ * } finally {
+ * scheduleNext();
* }
+ * }
+ * });
+ * if (active == null) {
+ * scheduleNext();
* }
+ * }
*
- * protected synchronized void scheduleNext() {
- * if ((active = tasks.poll()) != null) {
- * executor.execute(active);
- * }
+ * 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