2021-04-27 00:07:06 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** @generate-class-entries */
|
|
|
|
|
2021-07-16 18:46:43 +08:00
|
|
|
/**
|
|
|
|
* @strict-properties
|
|
|
|
* @not-serializable
|
|
|
|
*/
|
2021-04-27 00:07:06 +08:00
|
|
|
final class Fiber
|
|
|
|
{
|
|
|
|
public function __construct(callable $callback) {}
|
|
|
|
|
|
|
|
public function start(mixed ...$args): mixed {}
|
|
|
|
|
|
|
|
public function resume(mixed $value = null): mixed {}
|
|
|
|
|
|
|
|
public function throw(Throwable $exception): mixed {}
|
|
|
|
|
|
|
|
public function isStarted(): bool {}
|
|
|
|
|
|
|
|
public function isSuspended(): bool {}
|
|
|
|
|
|
|
|
public function isRunning(): bool {}
|
|
|
|
|
|
|
|
public function isTerminated(): bool {}
|
|
|
|
|
|
|
|
public function getReturn(): mixed {}
|
|
|
|
|
2021-06-19 00:02:02 +08:00
|
|
|
public static function getCurrent(): ?Fiber {}
|
2021-04-27 00:07:06 +08:00
|
|
|
|
|
|
|
public static function suspend(mixed $value = null): mixed {}
|
|
|
|
}
|
|
|
|
|
|
|
|
final class FiberError extends Error
|
|
|
|
{
|
|
|
|
public function __construct() {}
|
|
|
|
}
|