EventBus icon indicating copy to clipboard operation
EventBus copied to clipboard

Default use of non daemon threads

Open guoci opened this issue 3 years ago • 1 comments

By default, EventBus uses cached non-daemon threads and they are only removed after 60 seconds of unuse. This prevents the JVM from shutting down. System.exit() can of course be used to shut down the JVM with non-daemon threads, but requires code by the user of EventBus.

So will setting the default to creating daemon threads be a better choice?

guoci avatar Dec 22 '21 20:12 guoci

probably can't. because when the daemon threads and user threads finish their work,jvm will quit. but [post] method and [subscribe] method would be called durring the runtime always

tomridder avatar Mar 12 '23 15:03 tomridder