PHP Class mpyw\Co\Internal\ManualScheduler

Inheritance: extends AbstractScheduler
ファイルを表示 Open project: mpyw/co

Public Methods

Method Description
__construct ( CoOption $options, resource $mh ) Constructor.
add ( resource $ch ) : React\Promise\PromiseInterface Call curl_multi_add_handle() or push into queue.
isEmpty ( ) : boolean Are there no cURL handles?

Protected Methods

Method Description
interruptConsume ( ) Add cURL handles from waiting queue.

Private Methods

Method Description
addImmediate ( resource $ch, Deferred $deferred = null ) Call curl_multi_add_handle().
addReserved ( resource $ch, Deferred $deferred = null ) Push into queue.

Method Details

__construct() public method

Initialize cURL multi handle.
public __construct ( CoOption $options, resource $mh )
$options CoOption
$mh resource curl_multi

add() public method

Call curl_multi_add_handle() or push into queue.
public add ( resource $ch ) : React\Promise\PromiseInterface
$ch resource
return React\Promise\PromiseInterface

interruptConsume() protected method

Add cURL handles from waiting queue.
protected interruptConsume ( )

isEmpty() public method

Are there no cURL handles?
public isEmpty ( ) : boolean
return boolean