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

non-daemon thread with DefaultThreadFactory #5938

Closed
wu-xiang opened this issue Oct 24, 2016 · 2 comments
Closed

non-daemon thread with DefaultThreadFactory #5938

wu-xiang opened this issue Oct 24, 2016 · 2 comments

Comments

@wu-xiang
Copy link

wu-xiang commented Oct 24, 2016

Why not set daemon to true in DefaultThreadFactory by default?
Our application will not terminate for this reason.

@Scottmitch
Copy link
Member

I'm not sure if this has been considered but it would be a breaking change. Can you just use one of the constructors that allows you to control if threads are daemons?

@normanmaurer
Copy link
Member

@wu-xiang if you correctly shutdown your resources (like the EventLoopGroup) there should be no problems. If it hangs you miss to shutdown stuff correctly which I consider a bad thing.

That said as @Scottmitch pointed out you can just use a different constructor and use a ThreadFactory which creates daemon threads if you really want to.

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

3 participants