Threaded 类

(PECL pthreads >= 2.0.0)

简介

Threaded 对象提供支持 pthreads 操作的基本功能,包括同步方法以及其他对程序员很有帮助的接口。

重要的是,Threaded 提供了隐式的线程安全机制,这个对象中的所有操作都是线程安全的。

类摘要

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 ...$args): mixed
public wait(int $timeout = ?): bool
}

目录

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top