Skip to content

Use condition_variable for interruptible thread sleep in updateLoop#149

Open
arifBurakDemiray wants to merge 7 commits intostagingfrom
instant_stop
Open

Use condition_variable for interruptible thread sleep in updateLoop#149
arifBurakDemiray wants to merge 7 commits intostagingfrom
instant_stop

Conversation

@arifBurakDemiray
Copy link
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
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