Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-278

Allow to specify a ThreadPool to execute callbacks in and make callback executor deterministic

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: M3
    • Fix Version/s: None
    • Component/s: util
    • Labels:
      None

      Description

      Right now whenever a listener is added to a Future, that listener might be executed by the caller or be the task thread. This can easily lead to deadlocks without reentrant locks.

      So we should at least make it deterministic (i.e. have it always be executed by either the task thread or at least the same pool as the task thread).

      The best solution though would be to make it like guava's ListenableFuture which always executes listeners in their own executor.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dralves David Alves
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: