package riot

  1. Overview
  2. Docs
type exit_reason =
  1. | Normal
  2. | Exit_signal
  3. | Exception of exn
module Messages : sig ... end
type state =
  1. | Runnable
  2. | Waiting_message
  3. | Waiting_io of {
    1. syscall : string;
    2. mode : [ `r | `rw | `w ];
    3. fd : Util.Fd.t;
    }
  4. | Running
  5. | Exited of exit_reason
  6. | Finalized
type process_flags = {
  1. trap_exits : bool Stdlib.Atomic.t;
}
type process_flag =
  1. | Trap_exit of bool
val default_flags : unit -> process_flags
type t = {
  1. pid : Pid.t;
  2. sid : Scheduler_uid.t;
  3. flags : process_flags;
  4. state : state Stdlib.Atomic.t;
  5. mutable cont : exit_reason Proc_state.t;
  6. mailbox : Mailbox.t;
  7. save_queue : Mailbox.t;
  8. mutable read_save_queue : bool;
  9. monitors : Pid.t list Stdlib.Atomic.t;
}
exception Process_reviving_is_forbidden of t
val make : Scheduler_uid.t -> (unit -> exit_reason) -> t
val pp : Stdlib.Format.formatter -> t -> unit
val pp_state : Stdlib.Format.formatter -> state -> unit
val pp_reason : Stdlib.Format.formatter -> exit_reason -> unit
val pp_flags : Stdlib.Format.formatter -> process_flags -> unit
val cont : t -> exit_reason Proc_state.t
val pid : t -> Pid.t
val sid : t -> Scheduler_uid.t
val state : t -> state
val monitors : t -> Pid.t list
val is_alive : t -> bool
val is_exited : t -> bool
val is_waiting : t -> bool
val is_waiting_io : t -> bool
val is_runnable : t -> bool
val is_running : t -> bool
val is_finalized : t -> bool
val has_empty_mailbox : t -> bool
val has_messages : t -> bool
val message_count : t -> int
val should_awake : t -> bool
val mark_as_awaiting_io : t -> string -> [ `r | `rw | `w ] -> Util.Fd.t -> unit
val mark_as_awaiting_message : t -> unit
val mark_as_running : t -> unit
val mark_as_runnable : t -> unit
val mark_as_exited : t -> exit_reason -> unit
val mark_as_finalized : t -> unit
val set_flag : t -> process_flag -> unit
val set_cont : t -> exit_reason Proc_state.t -> unit
val add_monitor : t -> Pid.t -> unit
val next_message : t -> Message.envelope option
val add_to_save_queue : t -> Message.envelope -> unit
val read_save_queue : t -> unit
val send_message : t -> Message.t -> unit
OCaml

Innovation. Community. Security.