shared-memory-ring-lwt

Shared memory rings for RPC and bytestream communications using Lwt
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library shared-memory-ring-lwt
Module Lwt_ring . Back
type ('a, 'b) t

Type of a backend connection to a shared ring. 'a is the response type, and 'b is the request id type (e.g. int or int64).

val init : ( 'b -> string ) -> ( 'a, 'b ) Ring.Rpc.Back.t -> ( 'a, 'b ) t

init string_of_id ring initialises a stateful lwt server attached to ring.

val push_response : ( 'a, 'b ) t -> ( unit -> unit ) -> ( Ring.buf -> unit ) -> unit

push_response t notify_fn fn finds a free slot and applies it to fn, signalling the client via notify_fn that a response is ready.