PHP Class Icicle\Loop\AbstractLoop

Inheritance: implements Icicle\Loop\Loop
Datei anzeigen Open project: icicleio/icicle Class Usage Examples

Public Methods

Method Description
__construct ( boolean $enableSignals = true )
await ( $resource, callable $callback, $persistent = false, $data = null ) : Io
clear ( )
immediate ( callable $callback, $data = null ) : Immediate
isEmpty ( ) : boolean Determines if there are any pending tasks in the loop.
isRunning ( ) : boolean
isSignalHandlingEnabled ( ) : boolean
maxQueueDepth ( integer $depth = null ) : integer
poll ( $resource, callable $callback, $persistent = false, $data = null ) : Io
queue ( callable $callback, array $args = [] )
run ( callable $initialize = null ) : boolean
signal ( $signo, callable $callback, $data = null ) : Signal
stop ( )
tick ( boolean $blocking = true )
timer ( $interval, $periodic, callable $callback, $data = null ) : Timer

Protected Methods

Method Description
createAwaitManager ( ) : IoManager
createImmediateManager ( ) : ImmediateManager
createPollManager ( ) : IoManager
createSignalManager ( ) : SignalManager
createTimerManager ( ) : TimerManager
dispatch ( boolean $blocking ) Dispatches all pending I/O, timers, and signal callbacks.
getAwaitManager ( ) : IoManager
getImmediateManager ( ) : ImmediateManager
getPollManager ( ) : IoManager
getSignalManager ( ) : SignalManager
getTimerManager ( ) : TimerManager

Method Details

__construct() public method

public __construct ( boolean $enableSignals = true )
$enableSignals boolean True to enable signal handling, false to disable.

await() public method

public await ( $resource, callable $callback, $persistent = false, $data = null ) : Io
$callback callable
return Io

clear() public method

public clear ( )

createAwaitManager() abstract protected method

abstract protected createAwaitManager ( ) : IoManager
return IoManager

createImmediateManager() protected method

protected createImmediateManager ( ) : ImmediateManager
return ImmediateManager

createPollManager() abstract protected method

abstract protected createPollManager ( ) : IoManager
return IoManager

createSignalManager() abstract protected method

abstract protected createSignalManager ( ) : SignalManager
return SignalManager

createTimerManager() abstract protected method

abstract protected createTimerManager ( ) : TimerManager
return TimerManager

dispatch() abstract protected method

Dispatches all pending I/O, timers, and signal callbacks.
abstract protected dispatch ( boolean $blocking )
$blocking boolean

getAwaitManager() protected method

protected getAwaitManager ( ) : IoManager
return IoManager

getImmediateManager() protected method

protected getImmediateManager ( ) : ImmediateManager
return ImmediateManager

getPollManager() protected method

protected getPollManager ( ) : IoManager
return IoManager

getSignalManager() protected method

protected getSignalManager ( ) : SignalManager
return SignalManager

getTimerManager() protected method

protected getTimerManager ( ) : TimerManager
return TimerManager

immediate() public method

public immediate ( callable $callback, $data = null ) : Immediate
$callback callable
return Immediate

isEmpty() public method

Determines if there are any pending tasks in the loop.
public isEmpty ( ) : boolean
return boolean

isRunning() public method

public isRunning ( ) : boolean
return boolean

isSignalHandlingEnabled() public method

maxQueueDepth() public method

public maxQueueDepth ( integer $depth = null ) : integer
$depth integer
return integer

poll() public method

public poll ( $resource, callable $callback, $persistent = false, $data = null ) : Io
$callback callable
return Io

queue() public method

public queue ( callable $callback, array $args = [] )
$callback callable
$args array

run() public method

public run ( callable $initialize = null ) : boolean
$initialize callable
return boolean

signal() public method

public signal ( $signo, callable $callback, $data = null ) : Signal
$callback callable
return Signal

stop() public method

public stop ( )

tick() public method

public tick ( boolean $blocking = true )
$blocking boolean

timer() public method

public timer ( $interval, $periodic, callable $callback, $data = null ) : Timer
$callback callable
return Timer