package async_kernel
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Monadic concurrency library
Install
dune-project
Dependency
Authors
Maintainers
Sources
async_kernel-v0.16.0.tar.gz
sha256=0eda59386235e967698834d71cb8924d7b466bc4fcbf26ae72797ad05ca6f8a9
doc/src/async_kernel/ivar_filler.ml.html
Source file ivar_filler.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36open! Core open! Import type 'a u = | Empty of 'a Ivar.t | Full [@@deriving sexp_of] type 'a t = 'a u ref [@@deriving sexp_of] let invariant _ t = Invariant.invariant [%here] t [%sexp_of: _ t] (fun () -> match !t with | Full -> () | Empty ivar -> assert (Ivar.is_empty ivar)) ;; let create () = let ivar = Ivar.create () in let t = ref (Empty ivar) in t, Ivar.read ivar ;; let is_empty t = match !t with | Empty _ -> true | Full -> false ;; let fill t a = match !t with | Empty i -> t := Full; Ivar.fill i a | Full -> raise_s [%message "attempt to fill full ivar"] ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>