pthreads Threaded 클래스
(PECL pthreads >= 2.0.0)
소개
스레드된 개체는 사용자 코드를 병렬로 실행하는 pthreads 기능의 기초를 형성합니다. 동기화 메서드와 다양한 유용한 인터페이스를 제공합니다.
스레드된 개체는 가장 중요하게 프로그래머에게 암시적 안전을 제공합니다. 개체 범위에 대한 모든 작업은 안전합니다.
클래스 개요
class Threaded implements Collectable, Traversable, Countable, ArrayAccess {
/* Methods */
public chunk(int $size, bool $preserve): array
public count(): int
public extend(string $class): bool
public isRunning(): bool
public isTerminated(): bool
public merge(mixed $from, bool $overwrite = ?): bool
public notify(): bool
public notifyOne(): bool
public pop(): bool
public run(): void
public shift(): mixed
public synchronized(Closure $block, mixed ...$args): mixed
public wait(int $timeout = ?): bool
}
목차
- Threaded::chunk — Manipulation
- Threaded::count — Manipulation
- Threaded::extend — Runtime Manipulation
- Threaded::isRunning — State Detection
- Threaded::isTerminated — State Detection
- Threaded::merge — Manipulation
- Threaded::notify — Synchronization
- Threaded::notifyOne — Synchronization
- Threaded::pop — Manipulation
- Threaded::run — Execution
- Threaded::shift — Manipulation
- Threaded::synchronized — Synchronization
- Threaded::wait — Synchronization