Skip to content

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.

1 participant