| 1 |
<?php |
| 2 |
|
| 3 |
namespace React\Async; |
| 4 |
|
| 5 |
/** |
| 6 |
* This interface its only purpose is interoperability. Where with |
| 7 |
* event loops one could simply wrap another event loop. But with fibers |
| 8 |
* that has become impossible and as such we provide this interface and the |
| 9 |
* FiberFactory. |
| 10 |
* |
| 11 |
* Usage is not documented and as such not supported and might chang without |
| 12 |
* notice. Use at your own risk. |
| 13 |
* |
| 14 |
* @internal |
| 15 |
*/ |
| 16 |
interface FiberInterface |
| 17 |
{ |
| 18 |
public function resume(mixed $value): void; |
| 19 |
|
| 20 |
public function throw(\Throwable $throwable): void; |
| 21 |
|
| 22 |
public function suspend(): mixed; |
| 23 |
} |