| 1 | <?php |
||
| 7 | class MultiRequestCore |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * MultiRequest constructor. |
||
| 11 | * @param callable[] $threads |
||
| 12 | * @param callable $waitAll |
||
| 13 | */ |
||
| 14 | 3 | public function __construct(array $threads, callable $waitAll) |
|
| 29 | |||
| 30 | 3 | public function run() |
|
| 36 | |||
| 37 | 2 | public function wait($waitAble){ |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | 3 | public function getResults() |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @var callable[] |
||
| 65 | */ |
||
| 66 | protected $waits = []; |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @var callable[] |
||
| 70 | */ |
||
| 71 | protected $threads = []; |
||
| 72 | |||
| 73 | protected $threadResults = []; |
||
| 74 | /** |
||
| 75 | * @var callable |
||
| 76 | */ |
||
| 77 | protected $waitAll; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @var callable |
||
| 81 | */ |
||
| 82 | protected $waitResults = []; |
||
| 83 | } |