14 |
|
import java.util.function.Consumer; |
15 |
|
import java.util.function.Function; |
16 |
|
import java.util.function.Supplier; |
17 |
+ |
import java.util.Objects; |
18 |
|
|
19 |
|
/** |
20 |
|
* A {@link Future} that may be explicitly completed (setting its |
410 |
|
|
411 |
|
/** Fallback if ForkJoinPool.commonPool() cannot support parallelism */ |
412 |
|
static final class ThreadPerTaskExecutor implements Executor { |
413 |
< |
public void execute(Runnable r) { new Thread(r).start(); } |
413 |
> |
public void execute(Runnable r) { |
414 |
> |
Objects.requireNonNull(r); |
415 |
> |
new Thread(r).start(); |
416 |
> |
} |
417 |
|
} |
418 |
|
|
419 |
|
/** |