La classe Fiber

(PHP 8 >= 8.1.0)

Introduction

Les fibres reprĂ©sentent des fonctions interruptibles sur toute la pile. Les fibres peuvent ĂȘtre suspendues Ă  n'importe quel endroit de la pile d'appels, en interrompant l'exĂ©cution Ă  l'intĂ©rieur de la fibre jusqu'Ă  ce que la fibre soit reprise ultĂ©rieurement.

Synopsis de la classe

final class Fiber {
/* Méthodes */
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 getReturn(): mixed
public function isStarted(): bool
public function isSuspended(): bool
public function isRunning(): bool
public function isTerminated(): bool
public static function suspend(mixed $value = null): mixed
public static function getCurrent(): ?Fiber
}

Sommaire

add a note

User Contributed Notes

There are no user contributed notes for this page.