This commit is contained in:
Simon Cruanes 2025-12-05 16:08:16 -05:00
parent 2a850b0329
commit 534b3537f8
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 2 additions and 3 deletions

View file

@ -103,7 +103,8 @@ module Consumer_impl = struct
}
let shutdown self =
if not (Atomic.exchange self.stop true) then (
Atomic.set self.stop true;
if not (Atomic.exchange self.cleaned true) then (
CNotifier.trigger self.notify;
CNotifier.delete self.notify
)

View file

@ -23,7 +23,6 @@ module Consumer_impl = struct
config: Config.t;
mutable send_threads: Thread.t array;
(** Threads that send data via http *)
cleaned: bool Atomic.t; (** True when we cleaned up after closing *)
mcond: Util_thread.MCond.t; (** how to wait for the queue *)
}
@ -133,7 +132,6 @@ module Consumer_impl = struct
config;
send_threads = [||];
bq = q;
cleaned = Atomic.make false;
mcond = Util_thread.MCond.create ();
}
in