README

moonbitlang/async/signal does not have a README file

#
Signal

pub(all) enum Signal {
SIGINT
SIGTERM
SIGHUP
SIGBREAK
} derive(
Debug
)

The set of currently supported signals.
  • SIGINT: SIGINT on Unix, CTRL_C_EVENT on Windows
  • SIGTERM: SIGTERM on Unix, unavailable on Windows
  • SIGHUP: SIGHUP on Unix, CTRL_CLOSE_EVENT on Windows
  • SIGBREAK: unavailable on Unix, CTRL_BREAK_EVENT on Windows

#
Signal::to_int

fn Signal::to_int(signal : Signal) -> Int

Convert a signal to its underlying signal code in the OS. The result of this function is platform-dependent.

#
set_global_cancellation_signals

fn set_global_cancellation_signals(signals : ReadOnlyArray[Signal]) -> Unit

Set the list of signals that are used as global cancellation signal. When a global cancellation signal is received, the whole program will be cancelled gracefully, using the native cancellation mechanism of moonbitlang/async.

Signals unavailable on current platform will be silently ignored.

The default list is all supported signals.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io