← All compilation units

Flyology.Process_Lifecycle

Description

Exposes inert process-level state for the patched tasking runtime.

Example:

State := Flyology.Process_Lifecycle.State;

Created_Groups

function Created_Groups return Group_Count

Count groups currently owned by the process. This thread-safe query is inert and does not start an event loop.

Return value

Number of created groups

Raised exceptions
Program_Error

The runtime reports an invalid count

Event_Runtime_State

type Event_Runtime_State is
  (Dormant,
   Running,
   Finalizing,
   Stopped,
   Cleanup_Deferred,
   Fork_Child);

Process-wide Flyology scheduler lifecycle.

Enumeration literals
Dormant

Initialized but no event-loop group was created

Running

At least one group exists and finalization has not begun

Finalizing

Runtime shutdown is in progress

Stopped

Runtime shutdown completed

Cleanup_Deferred

Unsafe cleanup was deferred to process exit

Fork_Child

Process identity changed after runtime initialization

Group_Count

subtype Group_Count is Natural range 0 .. 256;

Number of possible lazily created execution groups.

State

function State return Event_Runtime_State

Read the process lifecycle without taking a runtime lock. Native-only programs remain Dormant until GNARL finalization changes them to Stopped. Cleanup_Deferred means live resources were intentionally left for OS process exit. Fork_Child is diagnostic only: after fork, only async-signal-safe operations followed by exec or _exit are supported.

Return value

Current process lifecycle state

Raised exceptions
Program_Error

The runtime reports an unknown state encoding