eventbus
  1. eventbus
  2. EVENTBUS-32

Cleanup runs in non-daemon thread which prevents JVM shutdown

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      32

      Description

      Class ThreadSafeEventService seems to have the definition of daemon threads
      confused.

      The class javadocs say “Cleanup is not run in a daemon thread, and thus will not
      stop the JVM from exiting.�, but non-daemon threads DO prevent the JVM from exiting.

      Also, in method startCleanup, the Timer is instantiated using the empty
      constructor which results in the Timer using a non-daemon thread, thus the event
      service DOES prevent the JVM from shutting down.

        Activity

        Hide
        michaelbushe added a comment -

        Agreed. I'll put out a patch soon. Note that if you empty all the subscribers,
        this will cause the timer to be canceled and the thread will then die.
        Interesting that I haven't seen this behavior - maybe I'm good about cleaning up.

        Show
        michaelbushe added a comment - Agreed. I'll put out a patch soon. Note that if you empty all the subscribers, this will cause the timer to be canceled and the thread will then die. Interesting that I haven't seen this behavior - maybe I'm good about cleaning up.

          People

          • Assignee:
            eventbus-issues
            Reporter:
            mcdev1
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: