[concurrency-interest] Upcoming jdk9 j.u.c JEP

Doug Lea dl at cs.oswego.edu
Fri Jul 24 16:26:20 EDT 2015

I've been encouraging people to discuss spec issues at
just to keep them in one place.

But this one might impact SubmissionPublisher (a potential j.u.c
class, not the spec itself):

On 07/23/2015 06:35 PM, Greg Wilkins wrote:

> Specifically that it is asymmetric and an error in the
> middle of a chain of processors can be propagated downstream with
> onError(Throwable) but can only be propagated upstream with cancel().

If a call to onNext throws an exception, the only thing guaranteed
is that the subscription will be cancelled. (There are also some
words saying that the Subscriber is at that point non-compliant.)
But I don't see anything that stops any publisher/subscription
from doing something with that exception before/during the
cancellation. So should there be a SubmissionPublisher method
along the lines of:

   onSubscriberException(Consumer<? extends Throwable> handler);


More information about the Concurrency-interest mailing list