package devkit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Development kit - general purpose library
Install
dune-project
Dependency
Authors
Maintainers
Sources
1.20261006.tar.gz
md5=a39dbbce04bd5562a9b4443daf39c582
sha512=b10104b61384b2151521b785e7f3c3250134c75eae09b42cad69bc4a22a9a5e429beb891ee87cedf376c23d9c40f09d3f71c3fd48aa35df490c0f69dc17f3242
doc/src/devkit.core/mVar.ml.html
Source file mVar.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21open ExtThread type 'a t = { mutex : Mutex.t; cond : Condition.t; mutable v : 'a option; } let create () = { mutex = Mutex.create (); cond = Condition.create (); v = None; } let set t x = locked t.mutex (fun () -> t.v <- Some x; Condition.signal t.cond) let clear t = locked t.mutex (fun () -> t.v <- None) let rec wait t = match t.v with | None -> Condition.wait t.cond t.mutex; wait t | Some x -> x let get t = locked t.mutex (fun () -> wait t) let grab t = locked t.mutex (fun () -> let x = wait t in t.v <- None; x) let try_get t = locked t.mutex (fun () -> t.v) let try_grab t = locked t.mutex (fun () -> let x = t.v in t.v <- None; x)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>