Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default use of non daemon threads #689

Open
guoci opened this issue Dec 22, 2021 · 1 comment
Open

Default use of non daemon threads #689

guoci opened this issue Dec 22, 2021 · 1 comment

Comments

@guoci
Copy link
Contributor

guoci commented Dec 22, 2021

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?

@tomridder
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants