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

Added DaemonThreadFactory to avoid hanging in the tehuti application #29

Merged

Conversation

gaojieliu
Copy link
Collaborator

Previously, 'RedundantLogFilter' is using non-daemon thread to clean up the log filter, and it would result in stuck application if the application doesn't invoke 'RedundantLogFilter#shutdown', which is error prone. This PR adds a 'DaemonThreadFactory', so that the log filter threads won't block Tehuti application shutdown even it doesn't invoke 'RedundantLogFilter#shutdown' explicitly.

Previously, 'RedundantLogFilter' is using non-daemon thread to clean up
the log filter, and it would result in stuck application if the application
doesn't invoke 'RedundantLogFilter#shutdown', which is error prone.
This PR adds a 'DaemonThreadFactory', so that the log filter threads
won't block Tehuti application shutdown even it doesn't invoke
'RedundantLogFilter#shutdown' explicitly.
Copy link
Contributor

@FelixGV FelixGV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Gaojie!

@gaojieliu gaojieliu merged commit c93658b into tehuti-io:master Feb 1, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants