PHPackages                             bugdhdj/pthwools - 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. bugdhdj/pthwools

ActiveLibrary

bugdhdj/pthwools
================

A polyfill for pthreads

14PHP

Since Jul 28Pushed 4y agoCompare

[ Source](https://github.com/bugdhdj/pthwools)[ Packagist](https://packagist.org/packages/bugdhdj/pthwools)[ RSS](/packages/bugdhdj-pthwools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

pthwools
========

[](#pthwools)

[![GitHub license](https://camo.githubusercontent.com/bbb62ec6fd3cd43da9fcc3453c4a2fc7aebe4fd1f05c9817d68cb0b0fcbf124c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6275676468646a2f707468776f6f6c73)](https://github.com/bugdhdj/pthwools/blob/master/LICENSE)[![Composer packagist](https://camo.githubusercontent.com/192cf26885868107ee2d5c7890a84a2f36a6f28c8f4a4d1285e2b07c78b3048f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6275676468646a2f707468776f6f6c73)](https://packagist.org/packages/bugdhdj/pthwools)

*pthwools* aims to satisfy the API requirements of *pthreads* with *swoole*, such that code written to depend on *pthreads* will work when *pthreads* is not, or can not be loaded.

*pthwools* does not implement the same execution model, for obvious reasons, but uses *swoole* coroutine to implement asynchronous code execution and multi-core optimization.

*pthwools* will ONLY fill for v3, behaviour is consistent with v3, which is the version new projects should target.

**It is used in [bugdhdj/PocketMine-MP-Swoole](https://github.com/bugdhdj/PocketMine-MP-Swoole) Project.**

Testing
-------

[](#testing)

*pthwools* is distributed with some unit tests, these tests should pass with and without *pthreads* loaded.

Testing *pthwools*

```
phpunit tests

```

If *pthreads* is loaded by your configuration the pthwools will not be used.

Testing code coverage for *pthwools*

```
phpdbg -nqrr vendor/bin/phpunit tests --coverage-text

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/85101213980c007dcff8dbbd395b56c8763f706c064d6de2e6c0114f946423f8?d=identicon)[LixWorth](/maintainers/LixWorth)

---

Top Contributors

[![krakjoe](https://avatars.githubusercontent.com/u/2236138?v=4)](https://github.com/krakjoe "krakjoe (52 commits)")[![dhdjSIS](https://avatars.githubusercontent.com/u/49927076?v=4)](https://github.com/dhdjSIS "dhdjSIS (27 commits)")[![lixworth](https://avatars.githubusercontent.com/u/22554300?v=4)](https://github.com/lixworth "lixworth (20 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (5 commits)")[![kelunik](https://avatars.githubusercontent.com/u/2743004?v=4)](https://github.com/kelunik "kelunik (1 commits)")[![cmyker](https://avatars.githubusercontent.com/u/1872718?v=4)](https://github.com/cmyker "cmyker (1 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")

### Embed Badge

![Health badge](/badges/bugdhdj-pthwools/health.svg)

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

PHPackages © 2026

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