Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303856

CompletableFuture.orTimeout() actions should run in the default executor

XMLWordPrintable

      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.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: