From ee40e445d108b23c75928acc0580700f586aec9c Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 5 Dec 2025 23:51:52 -0500 Subject: [PATCH] fix notifier_sync --- src/client/notifier_sync.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/notifier_sync.ml b/src/client/notifier_sync.ml index d418cb59..0f7b6220 100644 --- a/src/client/notifier_sync.ml +++ b/src/client/notifier_sync.ml @@ -13,8 +13,10 @@ let delete = ignore let[@inline] protect self f = Util_mutex.protect self.mutex f -(** NOTE: the mutex must be acquired *) -let wait self = Condition.wait self.cond self.mutex +let wait self = + Mutex.lock self.mutex; + Condition.wait self.cond self.mutex; + Mutex.unlock self.mutex (** Ensure we get signalled when the queue goes from empty to non-empty *) let register_bounded_queue (self : t) (bq : _ Bounded_queue.t) : unit =