package picos_io
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=862d61383e2df93a876bedcffb1fd1ddc0f96c50b0e9c07943a2aee1f0e182be
sha512=87805379017ef4a7f2c11b954625a3757a0f1431bb9ba59132202de278b3e41adbe0cdc20e3ab23b7c9a8c5a15faeb7ec79348e7d80f2b14274b00df0893b8c0
doc/picos_io.select/Picos_io_select/Intr/index.html
Module Picos_io_select.Intr
Source
A mechanism to interrupt blocking Unix
IO operations.
⚠️ The mechanism uses a signal which should not be used for other purposes.
⚠️ Beware that signal handling in OCaml 5.0.0 is known to be broken and several fixes were included in OCaml 5.1.0.
Represents an optional interrupt request.
A constant for a no request. clr nothing
does nothing.
req ~seconds
requests an interrupt in the form of a signal delivered to the thread that made the request within the specified number of seconds
. Blocking Unix
IO calls typically raise an error with the Unix.EINTR
error code when they are interrupted by a signal. Regardless of whether the signal gets triggered or a system call gets interrupted, the request must be cleared exactly once!
⚠️ Due to limitations of the OCaml system modules and unlike with typical timeout mechanisms, the interrupt may also be triggered sooner.