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.12.tbz
sha256=7641327370ece987c09accdd15eb31566931ecdd58d41189080b0b951b8addfc
sha512=65d45c44cda768ba6934ad4d6b9a397651a87b34a143c85fe1108228db861c369d6efc4832adfcac85368c6a861f33816af4d7c3e3d1238eaddfc564c0ea42db
doc/src/moonpool.private/lock_.ml.html
Source file lock_.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 36type 'a t = { mutex: Mutex.t; mutable content: 'a; } let create content : _ t = { mutex = Mutex.create (); content } let[@inline never] with_ (self : _ t) f = Mutex.lock self.mutex; match f self.content with | x -> Mutex.unlock self.mutex; x | exception e -> Mutex.unlock self.mutex; raise e let[@inline] mutex self = self.mutex let[@inline] update self f = with_ self (fun x -> self.content <- f x) let[@inline] update_map l f = with_ l (fun x -> let x', y = f x in l.content <- x'; y) let[@inline never] get l = Mutex.lock l.mutex; let x = l.content in Mutex.unlock l.mutex; x let[@inline never] set l x = Mutex.lock l.mutex; l.content <- x; Mutex.unlock l.mutex
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>