The Fiber class

Introduction

Fibers represent full-stack, interruptible functions. Fibers may be suspended from anywhere in the call-stack, pausing execution within the fiber until the fiber is resumed at a later time.

Class synopsis

final Fiber
/* Methods */
public __construct(callable $callback)
public mixed start(mixed ...$args)
public mixed resume(mixed $value = null)
public mixed throw(Throwable $exception)
public mixed getReturn()
public bool isStarted()
public bool isSuspended()
public bool isRunning()
public bool isTerminated()
public static mixed suspend(mixed $value = null)
public static Fibernull getCurrent()

See Also

Fibers overview

Table of Contents