package lwt-parallel
Module Parallel.IoSource
Serialization Protocols.
Source
val define :
put:(Lwt_io.output_channel -> 'a -> unit Lwt.t) ->
get:(Lwt_io.input_channel -> 'a Lwt.t) ->
'a iodefine ~put ~get defines a new serialization protocol.
The put function is responsible for writing the messages to the channel. The get function is responsible for reading the messages from the channel.
put io chan x uses protocol io to write x to chan.
get io chan uses protocol io to read a message from chan.