Open leostera opened 5 years ago
I'd like to keep track of some standard functions that we will need to build up more general patterns a la OTP.
exit : (Pid.t, ~reason:string) => unit
is_alive : Pid.t => bool
register : (Pid.t, ~name:string) => unit
unregister (~name:string) => unit
where_is : (~name:string) => option(Pid.t)
registered : unit => list((Pid.t, string))
halt : unit => unit
I'd like to keep track of some standard functions that we will need to build up more general patterns a la OTP.
Processes
exit : (Pid.t, ~reason:string) => unit
— force termination of an actor.is_alive : Pid.t => bool
— whether a Pid is alive or notregister : (Pid.t, ~name:string) => unit
— register a Pid with a well-known nameunregister (~name:string) => unit
— unregisters a process if it's registered.where_is : (~name:string) => option(Pid.t)
— find a pid registered with a nameregistered : unit => list((Pid.t, string))
— returns a list of tuples with the Pid and name they were registered withSystem
halt : unit => unit
— notify the main scheduler we should take the system down.