Skip to main content

Module signal

Module signal 

Source
Expand description

OS signal abstractions OS signal abstractions.

  • Unix: a SIGINT handler writes one byte to a self-pipe; [ctrl_c] awaits readability on the pipe through the runtime’s epoll/kqueue driver. No polling.
  • Windows: SetConsoleCtrlHandler routes console events through a future-based interface.
  • WASM: host import [crate::abi::imports::signal_wait] drives the completion.

Functions§

ctrl_c
Wait asynchronously until Ctrl-C (SIGINT) is received.