gleam/otp/system
Types
pub type DebugOption {
NoDebug
}
Constructors
-
NoDebug
pub type DebugState
pub type Mode {
Running
Suspended
}
Constructors
-
Running
Currently handling message as normal.
-
Suspended
Termporarily not handling messages, other than system messages.
pub type StatusInfo {
StatusInfo(
module: atom.Atom,
parent: process.Pid,
mode: Mode,
debug_state: DebugState,
state: dynamic.Dynamic,
)
}
Constructors
-
StatusInfo( module: atom.Atom, parent: process.Pid, mode: Mode, debug_state: DebugState, state: dynamic.Dynamic, )
pub type SystemMessage {
Resume(fn() -> Nil)
Suspend(fn() -> Nil)
GetState(fn(dynamic.Dynamic) -> Nil)
GetStatus(fn(StatusInfo) -> Nil)
}
Constructors
-
Resume(fn() -> Nil)
-
Suspend(fn() -> Nil)
-
GetState(fn(dynamic.Dynamic) -> Nil)
-
GetStatus(fn(StatusInfo) -> Nil)
Values
pub fn debug_state(a: List(DebugOption)) -> DebugState
pub fn get_state(from from: process.Pid) -> dynamic.Dynamic
Get the state of a given OTP compatible process. This function is only intended for debugging.
Requires Erlang/OTP 26.1 or newer, as the underlying interface changed in OTP-18633 from a literal type to a result type.
For more information see the Erlang documentation.
pub fn resume(pid: process.Pid) -> Nil
Request a suspended OTP compatible process to result, causing it to handle all messages rather than only system messages.
For more information see the Erlang documentation.
pub fn suspend(pid: process.Pid) -> Nil
Request an OTP compatible process to suspend, causing it to only handle system messages.
For more information see the Erlang documentation.