From 120823170d543d263a904990f307d035499806dc Mon Sep 17 00:00:00 2001 From: Chaitan Rogers Date: Sat, 20 Jan 2024 13:55:14 +0800 Subject: [PATCH] expose consume arguments --- async/src/queue.ml | 4 ++-- async/src/queue.mli | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/async/src/queue.ml b/async/src/queue.ml index 9d09550..830f6e8 100644 --- a/async/src/queue.ml +++ b/async/src/queue.ml @@ -50,7 +50,7 @@ type 'a consumer = { channel: 'a Channel.t; writer: Message.t Pipe.Writer.t } (** Consume message from a queue. *) -let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false) +let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false) ?(arguments=[]) ?on_cancel channel t = let open Spec.Basic in let (reader, writer) = Pipe.create () in @@ -77,7 +77,7 @@ let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false) no_ack; exclusive; no_wait = false; - arguments = []; + arguments; } in let var = Ivar.create () in diff --git a/async/src/queue.mli b/async/src/queue.mli index 9d2029b..f19f0ec 100644 --- a/async/src/queue.mli +++ b/async/src/queue.mli @@ -63,6 +63,7 @@ val consume : ?no_local:bool -> ?no_ack:bool -> ?exclusive:bool -> + ?arguments:Types.table -> ?on_cancel:(unit -> unit) -> 'a Channel.t -> t ->