Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Description
Currently the BlockingRejectedExecutionHandler throws a Rejected exception at https://github.com/infinispan/infinispan/blob/master/commons/src/main/java/org/infinispan/commons/util/concurrent/BlockingRejectedExecutionHandler.java#L38 when a non blocking thread can't pass a task to the blocking queue.
Unfortunately in rxjava 2 they catch the exception and log it and do nothing else at https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/schedulers/ExecutorScheduler.java#L175. This leads to having a publisher that never completes.
We should be able to throw a different exception, not RejectedExecutionException, and rxjava2 should catch and properly set it in the publisher to prevent this from happening.