The Threaded class

Introduction

Threaded objects form the basis of pthreads ability to execute user code in parallel; they expose synchronization methods and various useful interfaces.

Threaded objects, most importantly, provide implicit safety for the programmer; all operations on the object scope are safe.

Class synopsis

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