Threaded 類

(PECL pthreads >= 2.0.0)

簡(jiǎn)介

Threaded 對(duì)象提供支持 pthreads 操作的基本功能,包括同步方法以及其他對(duì)程序員很有幫助的接口。

重要的是,Threaded 提供了隱式的線程安全機(jī)制,這個(gè)對(duì)象中的所有操作都是線程安全的。

類摘要

class Threaded implements Collectable, Traversable, Countable, ArrayAccess {
/* 方法 */
public chunk(int $size, bool $preserve): array
public count(): int
public extend(string $class): bool
public isRunning(): bool
public isTerminated(): bool
publicmerge(mixed $from, bool $overwrite = ?): bool
public notify(): bool
public notifyOne(): bool
public pop(): bool
public run(): void
public shift(): boolean
public synchronized(Closure $block, mixed $... = ?): mixed
public wait(int $timeout = ?): bool
}

目錄