io_timeout(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

io_timeout β€” set a time limit on a descriptor β°πŸ’…


πŸŽ€ SYNTAX πŸŽ€

#include <libowfat/io.h>

void io_timeout(int64 fd,tai6464 deadline);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen, bestie 🫢 the io library is out here keeping track of an optional "timeout" for every single descriptor. and a timeout isn't like, a countdown in seconds or whatever β€” it's a very specific moment in time, and it lives in a tai6464 variable. so fancy, so precise, we love that for us ✨

io_timeout(d,t) just sets the timeout for descriptor d to t. that's it. that's the whole job. queen behavior, honestly πŸ‘‘

and here's the part where she has no return value β€” she always succeeds, no cap. the space to store that timeout was already allocated as part of the descriptor, so there's literally nothing that can go wrong here. πŸ’€

also! if d is not the number of a descriptor, this function just has no effect. no error, no drama, just nothing. it's giving unbothered 🌸

but wait, there's a catch bestie 😭 β€” setting a timeout does not magically notify you when it happens. you have to call io_timeouted to actually get notified about timeouts, just like you're calling io_canread or io_canwrite for read and write notification. same energy, different function. iykyk πŸ’«


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie, you ate it up πŸ“βœ¨ that was io_timeout(3) coming to you straight from the Library Functions Manual β€” mwah, xoxo, go set some deadlines πŸ’–πŸŽ€πŸ¦‹