package picos
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=0f2dcc67ddd127c68f388f2c36a8725a15723e6aeba7d1ddfcf4e016b54a4674
sha512=bee2a99458a451be285e2f13cc3a9deda8eed4e118bcdfc51c256d2da5bae92eec3386c318fe42dcf451421543b519dc064967158b3f417c9b7b44ce97c5fb75
doc/picos.select/Picos_select/Intr/index.html
Module Picos_select.Intr
Source
A mechanism to interrupt blocking Unix
IO operations.
⚠️ The mechanism uses the Sys.sigusr2
signal which should not be used for other purposes at the same time.
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.
⚠️ Due to limitations of the OCaml system modules and unlike with typical timeout mechanisms, the interrupt may also be triggered sooner.