RequestTimeout
Request timeout library for Excimer with plain PHP fallback
|
Excimer implementation of request timeouts. More...
Public Member Functions | |
__destruct () | |
ExcimerTimerWrapper has a circular reference in it and so the timer must be explicitly destroyed. | |
enterCriticalSection ( $name, $emergencyLimit, $emergencyCallback) | |
exitCriticalSection ( $id) | |
setWallTimeLimit ( $limit) | |
Set the wall time limit. | |
getWallTimeRemaining () | |
Get the amount of time remaining of the limit. | |
getWallTimeLimit () | |
Get the current wall time limit, or INF if there is no limit. | |
Public Member Functions inherited from Wikimedia\RequestTimeout\RequestTimeout | |
createCriticalSectionProvider ( $emergencyLimit, $emergencyCallback=null, $implicitExitCallback=null) | |
Create a CriticalSectionProvider with the specified configuration. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Wikimedia\RequestTimeout\RequestTimeout | |
static | singleton () |
Get a singleton instance of RequestTimeout. | |
static | setInstance (?RequestTimeout $instance) |
Set the instance to be returned by singleton(), or null to clear the instance so that it will be recreated. | |
static | factory () |
Create a new instance of RequestTimeout. | |
Excimer implementation of request timeouts.
See the doc comment on ExcimerTimerWrapper for an explanation of the split.
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::enterCriticalSection | ( | $name, | |
$emergencyLimit, | |||
$emergencyCallback ) |
Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::exitCriticalSection | ( | $id | ) |
Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::getWallTimeLimit | ( | ) |
Get the current wall time limit, or INF if there is no limit.
Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::getWallTimeRemaining | ( | ) |
Get the amount of time remaining of the limit.
If there is no limit, INF will be returned.
Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::setWallTimeLimit | ( | $limit | ) |
Set the wall time limit.
If excimer is available, an exception will be thrown after the specified number of seconds.
If excimer is not available, this falls back to set_time_limit(), which causes a fatal error after the CPU time (not wall clock time) exceeds the given number of seconds, which is rounded to an integer.
A time limit of INF or 0 is interpreted as no limit.
float | $limit | The limit in seconds |
Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.