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

Provide hooks to enable creation of all daemon threads

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.6.2, 2.7
    • None
    • None

      Goal: to enable a developer to setup JGroups to use only daemon threads. Default will still be that IO bound threads are non-daemons

      Jon Richards wrote:
      > It works OK for the thread pools used by TP but a couple of problems:
      >
      > Problem 1: I need to kludge it a bit: it turns out that I need to do a
      > channel.connect() before I can modify/set the TP thread pools because
      > the thread pools are created in TP.start(). This means that non-daemon
      > threads can get created before I have a chance to modify the setting.

      What if I check in TP.start() if thread_pool/oob_thread_pool is already set and don't create a thread pool of already set ? Then you could create a JChannel, set the thread pool(s) and then call JChannel.connect().

      > Problem 2: there are other threads at the transport level that get
      > created using ProtocolStack.getThreadFactory() and there is not way to
      > override how this thread factory gets created.

      I could provide setters for the 2 thread factories in ProtocolStack and make them non-final. Would that help ?

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

              Created:
              Updated:
              Resolved: