2017-01-14 16:13:59 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
open Error_monad
|
|
|
|
exception Exited of int
|
|
|
|
|
2017-04-10 00:52:24 +04:00
|
|
|
module Channel : sig
|
|
|
|
type ('a, 'b) t
|
|
|
|
val push: ('a, 'b) t -> 'a -> unit tzresult Lwt.t
|
|
|
|
val pop: ('a, 'b) t -> 'b tzresult Lwt.t
|
|
|
|
end
|
|
|
|
|
|
|
|
type ('a, 'b) t = {
|
|
|
|
termination: unit tzresult Lwt.t ;
|
|
|
|
channel: ('b, 'a) Channel.t ;
|
|
|
|
}
|
|
|
|
|
|
|
|
val detach:
|
|
|
|
?prefix:string ->
|
|
|
|
(('a, 'b) Channel.t -> unit tzresult Lwt.t) ->
|
|
|
|
('a, 'b) t Lwt.t
|
|
|
|
|
|
|
|
val wait_all: ('a, 'b) t list -> unit tzresult Lwt.t
|