Issue Details (XML | Word | Printable)

Key: EVENTBUS-32
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: eventbus-issues
Reporter: mcdev1
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
eventbus

Cleanup runs in non-daemon thread which prevents JVM shutdown

Created: 01/Jun/10 06:19 AM   Updated: 06/Jun/10 08:27 PM
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 32
Tags:
Participants: eventbus-issues, mcdev1 and michaelbushe


 Description  « Hide

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.



michaelbushe added a comment - 06/Jun/10 08:27 PM

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.