class

X::Process::Context

Inherits Reference / Object

Constructors

new(address : UInt64, instructions : Array(Instruction::Operation), parent : UInt64 | Nil)

Initialize with parent process

Source
new(address : UInt64, instructions : Array(Instruction::Operation))
Source

Instance methods

add_dependency(process_address : UInt64)

Add a process dependency

Source
address

Core process properties

Source
address=(address : UInt64)

Core process properties

Source
alive?

Check if process is alive

Source
blocked_sends
Source
blocked_sends=(blocked_sends : Array(Tuple(UInt64, Message::Context)))
Source
call_stack
Source
call_stack=(call_stack : Array(UInt64))
Source
counter
Source
counter=(counter : UInt64)
Source
created_at

Creation time for debugging

Source
created_at=(created_at : Time)

Creation time for debugging

Source
current_closure

For closure context

Source
current_closure=(current_closure : Lambda::Context | Nil)

For closure context

Source
current_exception

Current exception being handled (if any)

Source
current_exception=(current_exception : Value::Context | Nil)

Current exception being handled (if any)

Source
dependencies
Source
dependencies=(dependencies : Set(UInt64))
Source
exception_handlers

Exception handlers stack for try-catch

Source
exception_handlers=(exception_handlers : Array(Exceptions::Handler))

Exception handlers stack for try-catch

Source
flags

Process flags (like Erlang process flags)

Source
flags=(flags : Hash(String, Value::Context))

Process flags (like Erlang process flags)

Source
frame_pointer
Source
frame_pointer=(frame_pointer : Int32)
Source
globals
Source
globals=(globals : Hash(String, Value::Context))
Source
has_exception_handler?

Check if process has exception handlers

Source
increment_reductions(count : UInt64 = 1_u64)

Increment reductions counter

Source
info

Get process info as a hash

Source
instructions

Program and data

Source
instructions=(instructions : Array(Instruction::Operation))

Program and data

Source
locals
Source
locals=(locals : Array(Value::Context))
Source
mailbox
Source
mailbox=(mailbox : Mailbox)
Source
parent

Parent process that spawned this one

Source
parent=(parent : UInt64 | Nil)

Parent process that spawned this one

Source
peek_exception_handler

Get the current exception handler without removing it

Source
priority

Priority for scheduling

Source
priority=(priority : Priority)

Priority for scheduling

Source
reason

Exit reason when process terminates

Source
reason=(reason : Reason::Context | Nil)

Exit reason when process terminates

Source
reductions

Total reductions (instructions executed)

Source
reductions=(reductions : UInt64)

Total reductions (instructions executed)

Source
registered_name

Process identification

Source
registered_name=(registered_name : String | Nil)

Process identification

Source
remove_dependency(process_address : UInt64)

Remove a process dependency

Source
saved_instructions_stack

For indirect calls - saves instruction arrays

Source
saved_instructions_stack=(saved_instructions_stack : Array(Array(Instruction::Operation)) | Nil)

For indirect calls - saves instruction arrays

Source
stack
Source
stack=(stack : Array(Value::Context))
Source
state
Source
state=(state : State)
Source
subroutines
Source
subroutines=(subroutines : Hash(String, Instruction::Subroutine))
Source
summary

Get a summary string for logging

Source
wait_timed_out?

Check if wait has timed out

Source
waiting_for

Waiting state

Source
waiting_for=(waiting_for : Value::Context | Nil)

Waiting state

Source
waiting_message_id
Source
waiting_message_id=(waiting_message_id : UInt64 | Nil)
Source
waiting_since
Source
waiting_since=(waiting_since : Time | Nil)
Source
waiting_timeout
Source
waiting_timeout=(waiting_timeout : Time::Span | Nil)
Source