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

Add join_threads() #10086

Merged
merged 5 commits into from
Nov 15, 2022
Merged

Add join_threads() #10086

merged 5 commits into from
Nov 15, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 8, 2022

Signed-off-by: Glenn Jocher [email protected]

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced daemon thread handling in Ultralytics YOLOv5 by adding a method to join threads at exit.

πŸ“Š Key Changes

  • Introduced a new function join_threads(verbose=False).
  • This function iterates through all running threads and joins daemon threads to the main thread before exiting the program.

🎯 Purpose & Impact

  • Purpose: Ensures that all background processes (daemon threads) are properly concluded before the main program exits.
  • Impact: Improves the cleanup process of the software, ensuring that there are no hanging threads that could potentially lead to resource leaks or prevent the application from terminating correctly.
  • Users may experience a more graceful shutdown of the application with verbose feedback (if enabled) about the threads being joined.

@glenn-jocher glenn-jocher merged commit 9dd40f0 into master Nov 15, 2022
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.

None yet

1 participant