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
}

Voir aussi

Aperçu des fibres

Sommaire

Found A Problem?

Learn How To Improve This Page • Submit a Pull Request • Report a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /