package moonpool
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Pools of threads supported by a pool of domains
Install
dune-project
Dependency
Authors
Maintainers
Sources
moonpool-0.11.tbz
sha256=0f3d42753c2636a6a55427af89d2574b08a29c32100f2002ae3e47f6e4d23ff1
sha512=7fa651570493ddd7c594eb46b76782610da6a6823e5178c2b20ceafe2f159649caedaac01e975428605de865d3dff9008a798090cec77c909477a86c04532709
doc/src/moonpool/task_local_storage.ml.html
Source file task_local_storage.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 36 37 38 39 40 41 42 43 44open Types_ module PF = Picos.Fiber type 'a t = 'a PF.FLS.t exception Not_set = PF.FLS.Not_set let create = PF.FLS.create let[@inline] get_exn k = let fiber = get_current_fiber_exn () in PF.FLS.get_exn fiber k let get_opt k = match get_current_fiber () with | None -> None | Some fiber -> (match PF.FLS.get_exn fiber k with | x -> Some x | exception Not_set -> None) let[@inline] get k ~default = match get_current_fiber () with | None -> default | Some fiber -> PF.FLS.get fiber ~default k let[@inline] set k v : unit = let fiber = get_current_fiber_exn () in PF.FLS.set fiber k v let with_value k v (f : _ -> 'b) : 'b = let fiber = get_current_fiber_exn () in match PF.FLS.get_exn fiber k with | exception Not_set -> PF.FLS.set fiber k v; (* nothing to restore back to, just call [f] *) f () | old_v -> PF.FLS.set fiber k v; let finally () = PF.FLS.set fiber k old_v in Fun.protect f ~finally include Hmap_ls_
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>