-
-
Notifications
You must be signed in to change notification settings - Fork 0
LogicException
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.
- Full name:
\FastForward\Fork\Exception\LogicException - Parent class:
LogicException - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\Fork\Exception\ForkExceptionInterface - This class is a Final class
Creates an exception for attempts to fork from within a worker process.
public static forForkFromWorkerProcess(): selfA 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
Creates an exception for attempts by a worker to wait on itself.
public static forWorkerWaitingOnItself(int $workerPid): selfA 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