This is automatic generated document for things in Swow\Watchdog class

Class Watchdog

Methods

Static method isRunning

public static function isRunning ( ) : bool

Static method run

public static function run ( int $quantum , int $threshold , (callable | int | float | null) $alerter ) : void

When it is callable, it will be called when blocking occurred, the developer can choose to suspend the coroutine or kill the coroutine; when it is numeric, Coroutine will be delayed to run with sleep() in millisecond to alleviate CPU starvation; when it is null, Coroutine will be delayed to run at the next round of the event loop starts to alleviate CPU starvation.

Param int $quantum Nanoseconds, if the blocking time exceeds the quantum, alerter will be triggered. Param int $threshold Nanoseconds, if the blocking time exceeds the threshold (means the alerter does not alleviate the CPU starvation), it is considered that the system call blocking occurred.

Static method stop

public static function stop ( ) : void

Copyright 2022 the Swow contributors