PHPackages                             13dagger/mutex - 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. 13dagger/mutex

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

13dagger/mutex
==============

Simple MutEx lock implementation based on directory creation

v1.0.1(7y ago)124GPL-3.0-or-laterPHPPHP &gt;=5.4

Since Nov 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/13DaGGeR/php-mutex)[ Packagist](https://packagist.org/packages/13dagger/mutex)[ RSS](/packages/13dagger-mutex/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Simple MutEx lock implementation.

Gives you the easy way to check that your script runs as the only instance.

#### Basics

[](#basics)

1. try to lock, if ok -&gt; run your program, else stop
2. unlock when finished the job

#### Usage as php library

[](#usage-as-php-library)

```
if (Mutex::lock('example_job')) {
    // doing a job
}

```

by default library registers shutdown function to unlock, you can change this by changing the `Mutex::$autoUnlock` to false and using `Mutex::unlock()` method

#### Usage as linux command

[](#usage-as-linux-command)

install:

```
./install

```

lock:

```
mutex lock some_action

```

unlock:

```
mutex unlock some_action

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7604bf31dd5555628411330f56142fdd162bb24409af0649fd393320f112ca9a?d=identicon)[13dagger](/maintainers/13dagger)

---

Top Contributors

[![13DaGGeR](https://avatars.githubusercontent.com/u/749037?v=4)](https://github.com/13DaGGeR "13DaGGeR (15 commits)")

---

Tags

mutexlockserver task

### Embed Badge

![Health badge](/badges/13dagger-mutex/health.svg)

```
[![Health](https://phpackages.com/badges/13dagger-mutex/health.svg)](https://phpackages.com/packages/13dagger-mutex)
```

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514127.6M459](/packages/symfony-lock)[pudongping/hyperf-wise-locksmith

A mutex library provider for the Hyperf framework, designed to enable serialized execution of PHP code in high-concurrency scenarios.

106.3k2](/packages/pudongping-hyperf-wise-locksmith)[zerkalica/semaphore

This library provides an api for semaphore acquire and release

1119.0k1](/packages/zerkalica-semaphore)[nabao/laravel-lock

高性能, 分布式, 并发抢占锁, 队列锁

271.5k](/packages/nabao-laravel-lock)

PHPackages © 2026

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