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

Authored by bgamari on Jan 8 2019, 11:20 PM.

Description

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

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 (Trac #16150).

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

(cherry picked from commit 7b12b3f0240321ac1ee43f14eb9c07e015022eeb)

Details

Committed
bgamariJan 28 2019, 5:07 PM
Parents
rGHCff47e60a9d01: Fix bogus worker for newtypes
Branches
Unknown
Tags
Unknown