# | Line 778 | Line 778 | public class ThreadPoolExecutor extends | |
---|---|---|
778 | int c = ctl.get(); | |
779 | int rs = runStateOf(c); | |
780 | // Check if queue empty only if necessary, and re-read ctl | |
781 | < | // after this call to check if still same run state |
781 | > | // after this call to make CAS more likely to succeed. |
782 | if (rs == SHUTDOWN) { | |
783 | if (workQueue.isEmpty()) | |
784 | return false; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |