ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.128 by jsr166, Sat Dec 24 02:13:42 2011 UTC vs.
Revision 1.129 by dl, Wed May 9 10:44:40 2012 UTC

# Line 892 | Line 892 | public class ThreadPoolExecutor extends
892          boolean workerStarted = false;
893          Worker w = null;
894          try {
895 +            final ReentrantLock mainLock = this.mainLock;
896              w = new Worker(firstTask);
897              final Thread t = w.thread;
898 <            final ReentrantLock mainLock = this.mainLock;
898 >            if (t.isAlive()) // precheck that t is startable
899 >                throw new IllegalThreadStateException();
900              mainLock.lock();
901              try {
902                  // Recheck while holding lock.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines