package obatcher

  1. Overview
  2. Docs
type t

t represents the underlying service that processes and handles batches of operations as input. Only a single batch is active at any time

type cfg

cfg represents config variables that you want to expose to users.

type 'a op

'a op represents an single operation on t with the return type 'a.

type wrapped_op =
  1. | Mk : 'a op * 'a Picos.Computation.t -> wrapped_op
    (*

    wrapped_op binds the operation on the service with it's corresponding suspended continuation to run after its completion.

    *)
val init : ?cfg:cfg -> unit -> t

init () returns a new instance of the service.

val run : t -> wrapped_op array -> unit

run t ops when called on service t, processes all the operations in ops, possibly using parallelism to complete the batch.

OCaml

Innovation. Community. Security.