package gapi-ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b84b680528a5e050014103a8e7a60a5d43efd5fefc3f838310bd46769775ab48
md5=8ee26acf1f6c6f5e24c7b57fa070a0a2
doc/gapi-ocaml.netsys-local/Netsys_oothr/index.html
Module Netsys_oothr
Source
Object-oriented thread API
Makes the most important multi-threading primitives available using object types. For single-threaded apps, the operations are substituted by no-ops.
Return the multi-threading provider
serialize m f arg
: Locks m
, runs f arg
, unlocks m
, and returns the result.
atomic_init var new_value
: If the variable var
is None
, it is set to Some new_value
, and new_value
is returned. If it is Some old_value
, then old_value
is returned. The operation is atomic.
This function works independently of the provider.
compare_and_swap var old_value new_value
: If the variable var
is physically identical to old_value
it is atomically set to new_value
, and true
is returned. Otherwise, var
is not assigned, and false
is returned.
This function works independently of the provider.