RFR: jsr166 jdk9 integration wave 13

Stefan Zobel spliterator at gmail.com
Thu Dec 15 18:17:11 UTC 2016

> 2016-12-15 18:35 GMT+01:00 Doug Lea <dl at cs.oswego.edu>:
> Thanks. Changed.
> Using s1 on that line wasn't wrong, but wasn't intentional.
> (The first use of s1 catches error-before-subscribe; the
> "s2" cases just check against side effects, but they should
> use s2 consistently for uniformity.)
> -Doug

Ah, I see, thanks. Something else (unrelated) about SubmissionPublisher:

I recently noticed that javac creates a synthetic class and a bridge constructor
for SubmissionPublisher.ThreadPerTaskExecutor because its generated constructor
is private. I don't know if it really matters but that could be avoided by
declaring a package-private constructor that does nothing.

>    /** Fallback if ForkJoinPool.commonPool() cannot support parallelism */
>    private static final class ThreadPerTaskExecutor implements Executor {
>        // avoid creation of synthetic class and bridge constructor
>        ThreadPerTaskExecutor() {}
>        public void execute(Runnable r) { new Thread(r).start(); }
>    }


More information about the core-libs-dev mailing list