MultiRunner
in package
Simultaneous requests runner.
Tags
Table of Contents
Properties
- $cores : array<string|int, PromiseCore>
- Awaiting cores.
- $multiHandle : resource|null
- cURL multi handle.
Methods
- __destruct() : mixed
- Release resources if still active.
- add() : void
- Add promise to runner.
- remove() : void
- Remove promise from runner.
- wait() : void
- Wait for request(s) to be completed.
- findCoreByHandle() : PromiseCore|null
- Find core by handle.
Properties
$cores
Awaiting cores.
private
array<string|int, PromiseCore>
$cores
= []
$multiHandle
cURL multi handle.
private
resource|null
$multiHandle
Methods
__destruct()
Release resources if still active.
public
__destruct() : mixed
add()
Add promise to runner.
public
add(PromiseCore $core) : void
Parameters
- $core : PromiseCore
remove()
Remove promise from runner.
public
remove(PromiseCore $core) : void
Parameters
- $core : PromiseCore
wait()
Wait for request(s) to be completed.
public
wait([PromiseCore|null $targetCore = null ]) : void
Parameters
- $targetCore : PromiseCore|null = null
findCoreByHandle()
Find core by handle.
private
findCoreByHandle(resource $handle) : PromiseCore|null
Parameters
- $handle : resource