package obatcher

  1. Overview
  2. Docs
type 'a 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, 'b) op

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

type 'a wrapped_op =
  1. | Mk : ('a, 'b) op * 'b Picos.Computation.t -> 'a 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 -> 'a t

init () returns a new instance of the service.

val run : 'a t -> 'a 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.