Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2052

Timer: make timer thread pool and timer queue configurable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 4.0
    • None
    • None

      The timer (TimeScheduler3) currently has the thread pool enabled by default and the pool's queue is always on. Add 2 properties:

      1. timer_thread_pool.enabled: enables or disables the timer's thread pool and
      2. timer.queue_enabled: enables or disables the thread pool's queue.

      The timer has a runner thread which continually removes tasks scheduled for execution (from a DelayQueue) and dispatches the tasks to the thread pool. If the pool is disabled (#1), then it is the runner thread which executes the task directly. This makes sense for instance, when the timer only has non-blocking tasks. An example for a blocking task is a retransmission, which might block on the send side due to insufficient credits. The timer's thread pool is by default enabled, but it can now be disabled to reduce the threads running.

      Enabling the thread pool, but disabling the timer's queue means that the pool will allocate threads up to max-threads immediately, rather than queuing the tasks.

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: