-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
18
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
When CompletableFuture.orTimeout is used, if the timeout expires and the future is completed exceptionally it occurs in a CF dedicated single threaded pool. This can be a problem if the future had any stages attached to it as those stages execution now blocks other CFs from being able to be timed out. Looking at how CF.delayedExecutor() works in that it redispathes to the CF.defaultExecutor() it seems that may have been the intent of the CF.orTimeout() implementation but that it fell though the cracks? It seems that CF.orTimeout should redispatch to the CF.defaultExecutor once the timeout has expired.
When CompletableFuture.orTimeout is used, if the timeout expires and the future is completed exceptionally it occurs in a CF dedicated single threaded pool. This can be a problem if the future had any stages attached to it as those stages execution now blocks other CFs from being able to be timed out. Looking at how CF.delayedExecutor() works in that it redispathes to the CF.defaultExecutor() it seems that may have been the intent of the CF.orTimeout() implementation but that it fell though the cracks? It seems that CF.orTimeout should redispatch to the CF.defaultExecutor once the timeout has expired.