process/process
This is my docs
Types
BarePid
pub type BarePid { BarePid(BarePid) }
Constructors
-
BarePid(BarePid)
CallError
pub type CallError { Timeout Gone }
Constructors
-
Timeout
-
Gone
DemonitorOptions
pub type DemonitorOptions { Flush }
Constructors
-
Flush
ExitReason
pub type ExitReason { Normal Kill Killed }
Constructors
-
Normal
-
Kill
-
Killed
From
pub type From(r) { From(Ref, Pid(tuple(Ref, r))) }
Constructors
-
From(Ref, Pid(tuple(Ref, r)))
MonitorType
pub type MonitorType { Process }
Constructors
-
Process
OK
pub type OK { OK(OK) }
Constructors
-
OK(OK)
Pid
pub type Pid(m) { Pid(Pid(m)) }
Constructors
-
Pid(Pid(m))
ProcessFlag
pub type ProcessFlag { TrapExit(Bool) }
Constructors
-
TrapExit(Bool)
Ref
pub type Ref { Ref(Ref) }
Constructors
-
Ref(Ref)
Wait
pub type Wait { Infinity Milliseconds(Int) }
Constructors
-
Infinity
-
Milliseconds(Int)
Functions
bare
pub external fn bare(Pid(a)) -> BarePid
call
pub fn call( pid: Pid(a), constructor: fn(From(b)) -> a, wait: Wait, ) -> Result(a, CallError)
demonitor
pub external fn demonitor(Ref, List(DemonitorOptions)) -> Bool
do_sleep
pub external fn do_sleep(Int) -> OK
exit
pub external fn exit(Pid(m), ExitReason) -> Bool
monitor
pub external fn monitor(MonitorType, Pid(m)) -> Ref
monitor_process
pub fn monitor_process(pid: Pid(a)) -> Ref
process_flag
pub external fn process_flag(ProcessFlag) -> ProcessFlag
receive_reply
pub external fn receive_reply(Ref, Wait) -> Result(r, CallError)
reply
pub fn reply(from: From(a), message: a) -> tuple(Ref, a)
self
pub fn self(_: fn(Wait) -> Result(a, Nil)) -> Pid(a)
send
pub external fn send(Pid(m), m) -> m
spawn_link
pub external fn spawn_link(Run(m)) -> Pid(m)
unsafe_self
pub external fn unsafe_self() -> Pid(m)