package picos
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0f2dcc67ddd127c68f388f2c36a8725a15723e6aeba7d1ddfcf4e016b54a4674
sha512=bee2a99458a451be285e2f13cc3a9deda8eed4e118bcdfc51c256d2da5bae92eec3386c318fe42dcf451421543b519dc064967158b3f417c9b7b44ce97c5fb75
doc/picos.select/Picos_select/index.html
Module Picos_selectSource
Basic Unix.select based IO event loop for Picos.
The operations in this module automatically manage a Thread per domain that runs a Unix.select loop to support the operations.
⚠️ All the usual limitations of the Unix module apply.
Timeouts
cancel_after computation ~seconds exn_bt arranges for computation to be canceled with given exn_bt after given time in seconds. Completion of the computation before the specified time effectively cancels the timeout.
ℹ️ You can use cancel_after to implement the handler for the Cancel_after effect.
IO
return_on computation fd op value arranges for computation to be returned with given value when fd becomes available for op. Completion of the computation before the fd becomes available for op effectively cancels the await.
ℹ️ Using Unix.set_nonblock and return_on you can implement direct-style transparently asynchronous IO on top of the Unix module.
await_on fd op awaits until fd becomes available for op.