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.160 by jsr166, Tue Feb 17 18:55:39 2015 UTC vs.
Revision 1.161 by jsr166, Mon Jul 6 06:26:14 2015 UTC

# Line 1435 | Line 1435 | public class ThreadPoolExecutor extends
1435          final ReentrantLock mainLock = this.mainLock;
1436          mainLock.lock();
1437          try {
1438 <            for (;;) {
1439 <                if (runStateAtLeast(ctl.get(), TERMINATED))
1440 <                    return true;
1438 >            while (!runStateAtLeast(ctl.get(), TERMINATED)) {
1439                  if (nanos <= 0)
1440                      return false;
1441                  nanos = termination.awaitNanos(nanos);
1442              }
1443 +            return true;
1444          } finally {
1445              mainLock.unlock();
1446          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines