PHPackages                             exsyst/worker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. exsyst/worker

ActiveLibrary[Queues &amp; Workers](/categories/queues)

exsyst/worker
=============

Worker subprocess management

0.1.6(10y ago)46.3k11Apache-2.0PHPPHP &gt;=5.5

Since Sep 14Pushed 10y ago2 watchersCompare

[ Source](https://github.com/EXSyst/Worker)[ Packagist](https://packagist.org/packages/exsyst/worker)[ RSS](/packages/exsyst-worker/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (8)Used By (1)

[![Build Status](https://camo.githubusercontent.com/fee112289a171313741cd715acd628608b3dff05d09453db82555224187cf19c/68747470733a2f2f7472617669732d63692e6f72672f4558537973742f576f726b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/EXSyst/Worker)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/90b25802cc1cc23c954672dcf0d131e708cb1be33f19a1092b24acfd200b9e7c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4558537973742f576f726b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/EXSyst/Worker/?branch=master)

EXSyst Worker Component
=======================

[](#exsyst-worker-component)

Worker subprocess management

Operating system compatibility
------------------------------

[](#operating-system-compatibility)

This library uses Unix-specific utilities, such as `lsof` (for finding the process ID of a shared worker, and purging the file descriptors of a shared worker) and `getconf` (for querying the processor count, if you use the automatic worker pool sizing). If you use these features, please ensure that these programs are installed and executable by PHP.

This library is **unsupported on Windows**.

Dedicated workers
-----------------

[](#dedicated-workers)

A dedicated worker is the simplest worker type. It has only one master, and its communication channel is closed (which should stop it as soon as it has finished processing its messages) when its master's reference to it goes out of scope. It allows to run code in isolation from the master.

Here is a minimal example of a dedicated worker. `use`s and `require`s are skipped for brevity.

### `Master.php`

[](#masterphp)

```
