Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-475

ThreadPerSessionEventHandlingStrategy thread not exiting

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Default
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      linux

      Description

      such thread do not exit on acceptor.stop()

      stopDispatcherThreads iterates the collection after it clear()s it apparently so stopDispatcher() is not run on individual threads.

      The the run method of ThreadPerSessionEventHandlingStrategy checks for the stopped variable and exits if set to true.
      However it uses a blocking queue and if no messages come that variable is not checked so the thread can keep the app from exiting.

      In stopDispatcherThreads() we can interupt the thread if the queue is empty. Alternately instead of messages.take() we can use messages.poll()
      with a timeout, but than we need to check for null return.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jani jani
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: