Skip to content

Conversation

@jnsebgosselin
Copy link
Member

@jnsebgosselin jnsebgosselin commented Sep 3, 2025

This pull request refactors and improves the thread management logic in the QtAppUtils task manager. The changes focus on making the thread lifecycle more robust and predictable. Specifically:

  • The worker thread is now managed so it persists for the entire lifetime of the task manager object, rather than being started and stopped for each batch of tasks.
  • The shutdown logic has been improved. The close() method now ensures that all running tasks are completed before the worker thread is quit and joined, reducing the risk of premature thread termination or resource leaks.
  • Superfluous code related to thread and task state handling has been removed or simplified, resulting in a cleaner and more maintainable implementation.
  • These changes make the task manager more efficient and reliable, particularly in scenarios involving multiple batches of tasks or application shutdown.

@jnsebgosselin jnsebgosselin added this to the 0.9.1 milestone Sep 3, 2025
@jnsebgosselin jnsebgosselin self-assigned this Sep 3, 2025
@jnsebgosselin jnsebgosselin added the enhancement New feature or request label Sep 3, 2025
@jnsebgosselin jnsebgosselin merged commit 535bddb into main Sep 3, 2025
1 check passed
@jnsebgosselin jnsebgosselin deleted the rework_thread_management branch September 3, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants