package caqti-miou
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=036380a0f1a67e09d002cc47f2cb1c52ebf4f7cc9b89ea5b70cec3b389ce298d
sha512=8d8e12e6101bb9b61b805e68236375f685c63400fefe3de422a24990e16b16ef2eeaebc66171b8dbe498be3e3d394445ee49c9a93b5b0b3e9d9d43b9fcf1acdc
doc/caqti-miou/Caqti_miou/Switch/index.html
Module Caqti_miou.SwitchSource
Explicit Construction and Release
The following functions are resource-unsafe, since do not scope the lifetime of constructed switches to a function call like run. They are nevertheless useful for applications which do not follow the EIO-style resource handling discipline. The caqti-eio package uses the native EIO switch implementation, which excludes these functions.
release sw calls all cleanup handlers on sw in reverse order of registration and marks the switch as being off.
EIO-Compatible Interface
run f calls f with a fresh switch which will be released upon exit or in case of failure.
on_release_cancellable sw f registers f to be called upon the evetual release of sw unless remove_hook is called on the returned hook before that happen.
Given a hook returned by on_release_cancellable, remove_hook hook cancels the cleanup registered by that call.