Skip to content

LogicException

github-actions edited this page Apr 4, 2026 · 1 revision

Represents logical contract violations detected during worker orchestration.

This exception type is intended for scenarios in which the caller invokes the process management API in a way that is incompatible with the expected runtime lifecycle. Such failures indicate an invalid usage pattern rather than an invalid scalar argument value.

Callers MUST treat this exception as a signal of incorrect control flow or invalid process-context usage. Library code SHOULD throw this exception only when the operation is structurally invalid for the current execution state.


Methods

forForkFromWorkerProcess

Creates an exception for attempts to fork from within a worker process.

public static forForkFromWorkerProcess(): self

A worker process MUST NOT reuse a manager instance that belongs to a parent process context for creating nested workers. If nested process management is required, the worker SHOULD instantiate a new manager within its own process.

  • This method is static. Return Value:

a new instance describing the invalid fork attempt


forWorkerWaitingOnItself

Creates an exception for attempts by a worker to wait on itself.

public static forWorkerWaitingOnItself(int $workerPid): self

A worker MUST NOT attempt to block while waiting for its own termination, because such behavior would be logically invalid and would prevent correct lifecycle coordination.

  • This method is static. Parameters:
Parameter Type Description
$workerPid int the process identifier of the worker attempting to wait on itself

Return Value:

a new instance describing the self-wait violation


Clone this wiki locally