package ambient-context
Abstraction over thread-local / continuation-local storage mechanisms for communication with transitive dependencies
Install
Dune Dependency
Authors
Maintainers
Sources
v0.1.0.tar.gz
md5=0171c39c3b15aa567df33792d177314a
sha512=0ef177d42e120fb174350ebc9db7d87106d9509d0c9f7f49dfce3bbf424259a1ec8f9bbf1b6a8faecff10544a7530a5d1d4d2fffdfc3f4a39c34c119540a28b2
doc/ambient-context.atomic/Ambient_context_atomic/Atomic/index.html
Module Ambient_context_atomic.Atomic
Source
Atomic references.
Set a new value for the atomic reference, and return the current value.
compare_and_set r seen v
sets the new value of r
to v
only if its current value is physically equal to seen
-- the comparison and the set occur atomically. Returns true
if the comparison succeeded (so the set happened) and false
otherwise.
fetch_and_add r n
atomically increments the value of r
by n
, and returns the current value (before the increment).
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>