Skip to content

fix: improve ExecutorService performance and startup#12

Merged
AlexandreMunsch merged 1 commit intodevelop-3.3.5from
fix-executor
Nov 7, 2025
Merged

fix: improve ExecutorService performance and startup#12
AlexandreMunsch merged 1 commit intodevelop-3.3.5from
fix-executor

Conversation

@jeanpierrefortune
Copy link
Copy Markdown
Contributor

Replaces the Thread::sleep() busy-waiting loop with a std::condition_variable and std::mutex mechanism for a more efficient, low-CPU idle state. The worker thread is now started lazily on the first execute() call, avoiding unnecessary thread creation at startup. The shutdown() logic has also been updated to safely handle termination, even if the thread was never started.

Replaces the Thread::sleep() busy-waiting loop with a std::condition_variable and std::mutex mechanism for a more efficient, low-CPU idle state. The worker thread is now started lazily on the first execute() call, avoiding unnecessary thread creation at startup. The shutdown() logic has also been updated to safely handle termination, even if the thread was never started.
@sonarqubecloud
Copy link
Copy Markdown

@AlexandreMunsch AlexandreMunsch merged commit 30512c1 into develop-3.3.5 Nov 7, 2025
5 of 8 checks passed
@jeanpierrefortune jeanpierrefortune deleted the fix-executor branch November 17, 2025 11:00
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.

2 participants