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.189 by jsr166, Fri Feb 9 00:03:28 2018 UTC vs.
Revision 1.190 by jsr166, Wed Apr 3 20:55:45 2019 UTC

# Line 893 | Line 893 | public class ThreadPoolExecutor extends
893  
894                      if (isRunning(c) ||
895                          (runStateLessThan(c, STOP) && firstTask == null)) {
896 <                        if (t.isAlive()) // precheck that t is startable
896 >                        if (t.getState() != Thread.State.NEW)
897                              throw new IllegalThreadStateException();
898                          workers.add(w);
899 +                        workerAdded = true;
900                          int s = workers.size();
901                          if (s > largestPoolSize)
902                              largestPoolSize = s;
902                        workerAdded = true;
903                      }
904                  } finally {
905                      mainLock.unlock();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines