129 |
|
*/ |
130 |
|
public static ExecutorService newCachedThreadPool() { |
131 |
|
return new ThreadPoolExecutor(0, Integer.MAX_VALUE, |
132 |
< |
60, TimeUnit.SECONDS, |
132 |
> |
60L, TimeUnit.SECONDS, |
133 |
|
new SynchronousQueue<Runnable>()); |
134 |
|
} |
135 |
|
|
143 |
|
*/ |
144 |
|
public static ExecutorService newCachedThreadPool(ThreadFactory threadFactory) { |
145 |
|
return new ThreadPoolExecutor(0, Integer.MAX_VALUE, |
146 |
< |
60, TimeUnit.SECONDS, |
146 |
> |
60L, TimeUnit.SECONDS, |
147 |
|
new SynchronousQueue<Runnable>(), |
148 |
|
threadFactory); |
149 |
|
} |
299 |
|
return new PrivilegedThreadFactory(); |
300 |
|
} |
301 |
|
|
302 |
– |
|
302 |
|
/** |
303 |
|
* Returns a {@link Callable} object that, when |
304 |
|
* called, runs the given task and returns the given result. This |