Skip to content

itimer: Don't free condvar until we know ticker is stopped

Ben Gamari requested to merge wip/T16150 into master

When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150 (closed)).

Avoid this by moving the mutex destruction to the main thread.

Merge request reports