package procord

  1. Overview
  2. Docs
type ('a, 'b) worker_task
val make_worker_task : ?read_input:(string -> 'a) -> ?write_output:('b -> string) -> ?write_exception:(exn -> string) -> string -> ('a -> 'b) -> ('a, 'b) worker_task
val read_input : ('a, 'b) worker_task -> string -> 'a
val write_output : ('a, 'b) worker_task -> 'b -> string
val write_exception : ('a, 'b) worker_task -> exn -> string
val run : ('a, 'b) worker_task -> 'a -> 'b
val worker_task_name : ('a, 'b) worker_task -> string
type ('a, 'b) delegated_task
val make_delegated_task : ?write_input:('a -> string) -> ?read_output:(string -> 'b) -> ?read_exception:(string -> exn) -> string -> ('a, 'b) delegated_task
val write_input : ('a, 'b) delegated_task -> 'a -> string
val read_output : ('a, 'b) delegated_task -> string -> 'b
val read_exception : ('a, 'b) delegated_task -> (string -> exn) option
val delegated_task_name : ('a, 'b) delegated_task -> string
val make : ?read_input:(string -> 'a) -> ?write_input:('a -> string) -> ?read_output:(string -> 'b) -> ?write_output:('b -> string) -> ?read_exception:(string -> exn) -> ?write_exception:(exn -> string) -> string -> ('a -> 'b) -> ('a, 'b) worker_task * ('a, 'b) delegated_task
OCaml

Innovation. Community. Security.