package linol

  1. Overview
  2. Docs

Blocking IO with a new thread for each spawn.

type 'a t = 'a
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel = Stdlib.in_channel
type out_channel = Stdlib.out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
val n_bytes_written : int Stdlib.Atomic.t
  • since NEXT_RELEASE
val n_bytes_read : int Stdlib.Atomic.t
  • since NEXT_RELEASE
val default_spawn : (unit -> unit) -> unit

Start a new thread.

  • since NEXT_RELEASE