package sel
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Sel.Promise
Simple promise library for synchronization. There is no critical section support: if two threads run if not (is_resolved p) then fulfill r the behavior is undefined. Use only in a 1 producer 1 consumer scenario.
val pp_state :
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
'a state ->
unitval pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unitval is_resolved : 'a t -> boolis_resolved p is true if fulfill or reject was called
val fulfill : 'a handler -> 'a -> unitfulfill r v fulfills the promise with v.
val reject : 'a handler -> exn -> unitreject r e rejects the promise p with e.