Fix time-limit early interruption

If a value for --time-limit was set, then the thread was not interrupted
on stop (the condvar was not signaled).
This commit is contained in:
Romain Vimont 2024-10-08 18:12:55 +02:00
parent 0d8014be52
commit 5b10650f22

View File

@ -62,6 +62,7 @@ void
sc_timeout_stop(struct sc_timeout *timeout) { sc_timeout_stop(struct sc_timeout *timeout) {
sc_mutex_lock(&timeout->mutex); sc_mutex_lock(&timeout->mutex);
timeout->stopped = true; timeout->stopped = true;
sc_cond_signal(&timeout->cond);
sc_mutex_unlock(&timeout->mutex); sc_mutex_unlock(&timeout->mutex);
} }