Skip to content

Use condition_variable for interruptible thread sleep in updateLoop#149

Merged
arifBurakDemiray merged 15 commits intostagingfrom
instant_stop
Apr 16, 2026
Merged

Use condition_variable for interruptible thread sleep in updateLoop#149
arifBurakDemiray merged 15 commits intostagingfrom
instant_stop

Conversation

@arifBurakDemiray
Copy link
Copy Markdown
Member

Replace std::this_thread::sleep_for() in updateLoop() with std::condition_variable::wait_for() so that _deleteThread() can wake the background thread immediately via notify_one().

This makes stop() return instantly instead of blocking for up to the full update interval (e.g. 30 seconds in production builds).

Replace std::this_thread::sleep_for() in updateLoop() with
std::condition_variable::wait_for() so that _deleteThread() can
wake the background thread immediately via notify_one().

This makes stop() return instantly instead of blocking for up to
the full update interval (e.g. 30 seconds in production builds).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arifBurakDemiray arifBurakDemiray self-assigned this Mar 23, 2026
@arifBurakDemiray arifBurakDemiray merged commit 644fcf7 into staging Apr 16, 2026
12 of 14 checks passed
@arifBurakDemiray arifBurakDemiray deleted the instant_stop branch April 16, 2026 13:50
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