RequestTimeout
Request timeout library for Excimer with plain PHP fallback
Loading...
Searching...
No Matches
Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout Class Reference

Excimer implementation of request timeouts. More...

+ Inheritance diagram for Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout:
+ Collaboration diagram for Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout:

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.
 

Detailed Description

Excimer implementation of request timeouts.

See the doc comment on ExcimerTimerWrapper for an explanation of the split.

Member Function Documentation

◆ enterCriticalSection()

Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::enterCriticalSection ( $name,
$emergencyLimit,
$emergencyCallback )

◆ exitCriticalSection()

Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::exitCriticalSection ( $id)

◆ getWallTimeLimit()

Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::getWallTimeLimit ( )

Get the current wall time limit, or INF if there is no limit.

Returns
float

Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.

◆ getWallTimeRemaining()

Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout::getWallTimeRemaining ( )

Get the amount of time remaining of the limit.

If there is no limit, INF will be returned.

Returns
float

Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.

◆ setWallTimeLimit()

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.

Parameters
float$limitThe limit in seconds

Reimplemented from Wikimedia\RequestTimeout\RequestTimeout.


The documentation for this class was generated from the following file: