()
| 122 | } |
| 123 | |
| 124 | @Override |
| 125 | public Runnable take() throws InterruptedException { |
| 126 | if (parent != null && parent.currentThreadShouldBeStopped()) { |
| 127 | return poll(parent.getKeepAliveTime(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS); |
| 128 | // yes, this may return null (in case of timeout) which normally |
| 129 | // does not occur with take() |
| 130 | // but the ThreadPoolExecutor implementation allows this |
| 131 | } |
| 132 | return super.take(); |
| 133 | } |
| 134 | } |
no test coverage detected