Fiber class
(PHP 8 >= 8.1.0)
소개
파이버는 전체 스택의 인터럽트 가능한 함수를 나타냅니다. 광섬유는 호출 스택의 어느 곳에서나 일시 중단되어 광섬유가 나중에 재개될 때까지 광섬유 내에서 실행을 일시 중지할 수 있습니다.
인터페이스 개요
final class Fiber {
/* Methods */
public start(mixed ...$args): mixed
public resume(mixed $value = null): mixed
public throw(Throwable $exception): mixed
public getReturn(): mixed
public isStarted(): bool
public isSuspended(): bool
public isRunning(): bool
public isTerminated(): bool
public static suspend(mixed $value = null): mixed
public static getCurrent(): ?Fiber
}
기타
목차
- Fiber::__construct — Creates a new Fiber instance
- Fiber::start — Start execution of the fiber
- Fiber::resume — Resumes execution of the fiber with a value
- Fiber::throw — Resumes execution of the fiber with an exception
- Fiber::getReturn — Gets the value returned by the Fiber
- Fiber::isStarted — Determines if the fiber has started
- Fiber::isSuspended — Determines if the fiber is suspended
- Fiber::isRunning — Determines if the fiber is running
- Fiber::isTerminated — Determines if the fiber has terminated
- Fiber::suspend — Suspends execution of the current fiber
- Fiber::getCurrent — Gets the currently executing Fiber instance