This commit is contained in:
Simon Cruanes 2025-12-05 16:08:16 -05:00
parent 77321b542d
commit f519f2f49f
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 = 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.trigger self.notify;
CNotifier.delete self.notify CNotifier.delete self.notify
) )

View file

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