![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| __construct (string $moduleName, callable $loader, int $timeout=5000) | |
| getModuleName () | |
| getResult () | |
| isReady () | |
| isSuspended () | |
| isTerminated () | |
| wait (int $timeout=5000) | |
Private Attributes | |
| $fiber | |
| $initialized = false | |
| $moduleName | |
| $result = null | |
| $timeout | |
Class FiberModule
Internal single-fiber module wrapper. Manages the lifecycle of one module's fiber.
Definition at line 191 of file class.fibermoduleloader.php.
| __construct | ( | string | $moduleName, |
| callable | $loader, | ||
| int | $timeout = 5000 ) |
FiberModule constructor.
Creates and starts the fiber that runs the loader callback.
| string | $moduleName | The module name this fiber loads. |
| callable | $loader | The callback that loads the module. |
| int | $timeout | Maximum wait time in milliseconds. |
Definition at line 217 of file class.fibermoduleloader.php.
References $moduleName, $timeout, and Log\error().
| getModuleName | ( | ) |
Get module name
Definition at line 326 of file class.fibermoduleloader.php.
References $moduleName.
| getResult | ( | ) |
Get result from module loader
Definition at line 336 of file class.fibermoduleloader.php.
References $result.
| isReady | ( | ) |
Check if module is ready
Definition at line 296 of file class.fibermoduleloader.php.
| isSuspended | ( | ) |
Check if fiber is suspended (mid-execution)
Definition at line 306 of file class.fibermoduleloader.php.
| isTerminated | ( | ) |
Check if fiber is terminated
Definition at line 316 of file class.fibermoduleloader.php.
| wait | ( | int | $timeout = 5000 | ) |
Wait for module to finish loading Returns immediately if already done
| int | $timeout | Maximum wait time (ms) |
Definition at line 250 of file class.fibermoduleloader.php.
References $timeout, Log\error(), and Log\warning().
|
private |
Definition at line 194 of file class.fibermoduleloader.php.
|
private |
Definition at line 200 of file class.fibermoduleloader.php.
|
private |
Definition at line 197 of file class.fibermoduleloader.php.
Referenced by __construct(), and getModuleName().
|
private |
Definition at line 203 of file class.fibermoduleloader.php.
Referenced by getResult().
|
private |
Definition at line 206 of file class.fibermoduleloader.php.
Referenced by __construct(), and wait().