Fiber
final class Fiber (View source)
Methods
No description
Starts execution of the fiber. Returns when the fiber suspends or terminates.
Resumes the fiber, returning the given value from {Fiber::suspend()}.
No description
No description
No description
No description
No description
No description
Suspend execution of the fiber. The fiber may be resumed with {Fiber::resume()} or {Fiber::throw()}.
Details
__construct(callable $callback)
No description
mixed
start(mixed ...$args)
Starts execution of the fiber. Returns when the fiber suspends or terminates.
mixed
resume(mixed $value = null)
Resumes the fiber, returning the given value from {Fiber::suspend()}.
Returns when the fiber suspends or terminates.
mixed
throw(Throwable $exception)
Throws the given exception into the fiber from {Fiber::suspend()}.
Returns when the fiber suspends or terminates.
bool
isStarted()
No description
bool
isSuspended()
No description
bool
isRunning()
No description
bool
isTerminated()
No description
mixed
getReturn()
No description
static Fiber|null
getCurrent()
No description
static mixed
suspend(mixed $value = null)
Suspend execution of the fiber. The fiber may be resumed with {Fiber::resume()} or {Fiber::throw()}.
Cannot be called from {main}.