package caqti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8f6c1724b59ac22a5c657c9e53b9a1706e39ecd462e82958b0cea88e43f0aba7
sha512=75b968ab37ae94cadcaabbcce0f91b1ffa4334ed69e441bdeb823077eb7675264282efb0fab3baaaad446582cfb427769e19f22c8c194a316ac2248c3fba5cf8
doc/caqti.platform/Caqti_platform/Switch/Make/index.html
Module Switch.MakeSource
Parameters
Signature
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.