Thread::wait
Worker::chunk
pthreads
PHP Manual

# The Worker class

(PECL pthreads >= 0.36)

## Introduction

Worker Threads have a persistent context, as such should be used over Threads in most cases.

## Class synopsis

Worker {
/* Methods */
final public boolean chunk ( long `$size` , boolean `$preserve` )
final public long getCreatorId ( void )
final public int getStacked ( void )
final public long getThreadId ( void )
final public boolean isShutdown ( void )
final public boolean isWorking ( void )
final public boolean merge ( mixed `$from` [, mixed `$overwrite` ] )
final public boolean pop ( void )
abstract public void run ( void )
final public boolean shift ( void )
final public boolean shutdown ( void )
final public int stack ( Stackable `$work` )
final public boolean start ([ long `$options` ] )
final public int unstack ([ Stackable `$work` ] )
}

## Table of Contents

- Worker::chunk — Manipulation
- Worker::getCreatorId — Identification
- Worker::getStacked — Stack Analysis
- Worker::getThreadId — Identification
- Worker::isShutdown — State Detection
- Worker::isWorking — State Detection
- Worker::merge — Manipulation
- Worker::pop — Manipulation
- Worker::run — Execution
- Worker::shift — Manipulation
- Worker::shutdown — Synchronization
- Worker::stack — Stacking
- Worker::start — Execution
- Worker::unstack — Stacking

Thread::wait
Worker::chunk
pthreads
PHP Manual