PHPackages                             flowwe/mtman - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. flowwe/mtman

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

flowwe/mtman
============

MultiThreading Manager for PHP 8.3

v2.0.0(3mo ago)017PHPPHP ^8.3

Since Feb 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/timpisti/MTMan)[ Packagist](https://packagist.org/packages/flowwe/mtman)[ RSS](/packages/flowwe-mtman/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

MTMan
=====

[](#mtman)

A Multithreading Solution for PHP

Overview
--------

[](#overview)

MTMan is a production-ready multithreading management library for PHP 8.3+ that provides true parallel execution capabilities through native process management. It offers enterprise-grade features including automatic resource cleanup, configurable retry mechanisms, and comprehensive logging.

Key Advantages
--------------

[](#key-advantages)

### True Multithreading (vs ReactPHP)

[](#true-multithreading-vs-reactphp)

While ReactPHP uses an event loop for asynchronous operations, MTMan provides actual parallel execution

### Simplified Architecture (vs Swoole)

[](#simplified-architecture-vs-swoole)

Unlike Swoole's complex C-level implementation, MTMan provides a pure PHP solution

### Enhanced Versatility (vs Guzzle)

[](#enhanced-versatility-vs-guzzle)

While Guzzle focuses on HTTP requests, MTMan handles any parallel processing need

### Production-Ready Features (vs Spatie Ray)

[](#production-ready-features-vs-spatie-ray)

Unlike development tools like Spatie Ray, MTMan is built for production use

Technical Specifications
------------------------

[](#technical-specifications)

Thread Management

- OS-level process isolation through PCNTL
- Configurable thread limits
- Automatic thread cleanup
- Process status monitoring

Requirements
------------

[](#requirements)

PHP 8.3+ PCNTL extension Optional: SMBus for enhanced IPC

Basic Usage
-----------

[](#basic-usage)

```
use MTMan\MTMan;

$mtman = new MTMan(['threads_count' => 4]);

// Add parallel tasks
$mtman->addTask(function() {
    return processDataSet1();
});
$mtman->addTask(function() {
    return processDataSet2();
});

// Execute and get results
$results = $mtman->run();
```

Advanced Configuration
----------------------

[](#advanced-configuration)

```
$config = [
    'threads_count' => 4,
    'time_limit' => 60,
    'log_level' => 'DEBUG',
    'max_retries' => 3,
    'temp_dir' => '/var/mtman/temp'
];

$mtman = new MTMan($config);
```

Monitoring
----------

[](#monitoring)

```
// Get thread status
$status = $mtman->getThreadStatus();

// Sample log output
{
    "timestamp": "2024-02-11T15:30:00",
    "process_id": 12345,
    "thread_id": 2,
    "status": "completed",
    "execution_time": 1.23,
    "memory_peak": "2.5MB"
}
```

Check example dir content from browser
--------------------------------------

[](#check-example-dir-content-from-browser)

...to get fancy-handy informations about the current processes

If look like everything is working from browser, but the output is null
-----------------------------------------------------------------------

[](#if-look-like-everything-is-working-from-browser-but-the-output-is-null)

Your server forbid PCNTL functions in FPM mode. Check the example directory for solution to calling MTMan in CLI mode.

### License

[](#license)

MIT License - see LICENSE file for details.

### Contributing

[](#contributing)

See CONTRIBUTING.md for contribution guidelines.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~462 days

Total

2

Last Release

91d ago

Major Versions

v1.0.0 → v2.0.02026-05-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6224055?v=4)[timpisti](/maintainers/timpisti)[@timpisti](https://github.com/timpisti)

---

Top Contributors

[![timpisti](https://avatars.githubusercontent.com/u/6224055?v=4)](https://github.com/timpisti "timpisti (5 commits)")[![4i-helpynet](https://avatars.githubusercontent.com/u/20337770?v=4)](https://github.com/4i-helpynet "4i-helpynet (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flowwe-mtman/health.svg)

```
[![Health](https://phpackages.com/badges/flowwe-mtman/health.svg)](https://phpackages.com/packages/flowwe-mtman)
```

###  Alternatives

[bymayo/delete-account

Allows users to delete their own account within Twig templates (Front end).

125.2k](/packages/bymayo-delete-account)[webidea24/magento2-module-pagebuilder-wysiwyg-html-editor

Magento 2 Module: Make the toggle-Button for HTML Editor available in PageBuilder elements

124.4k](/packages/webidea24-magento2-module-pagebuilder-wysiwyg-html-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
