PHPackages                             limslock/lock - 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. limslock/lock

ActiveLibary

limslock/lock
=============

redis lock https://github.com/zhaocong6/lock 根据大佬修车工修改完成

1.0.1(7y ago)021MITPHPPHP &gt;=5.4

Since Jun 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/limingshang/redislock)[ Packagist](https://packagist.org/packages/limslock/lock)[ RSS](/packages/limslock-lock/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

redislock
=========

[](#redislock)

```
基于tp5  如果其他框架请修改config.php配置
安装地址
composer require limslock/lock

基于predis类
如需自己安装predis请执行
composer require predis/predis
tp5扩展，如需其他请自行配置Config.php

```

单队列调用 每次只执行一个消息，多余消息将直接返回队列被抛出异常：单队列已被占用！请稍后
--------------------------------------------

[](#单队列调用--每次只执行一个消息多余消息将直接返回队列被抛出异常单队列已被占用请稍后)

```
$lock=new Lock();
$lock->queueLock(
    function ($redis){
        echo "hello word!";
        sleep(10);
    },
    "hello",
    50
);

```

多队列调用 可持续写入消息，当超过最大队列消息，将会抛出异常：队列已被占满，请等待处理完毕后重试
------------------------------------------------

[](#多队列调用-可持续写入消息当超过最大队列消息将会抛出异常队列已被占满请等待处理完毕后重试)

```
$lock->lock(
    function ($redis){
        echo "hello word!";
        sleep(10);
    },
    "hello",
    50,
    3
);

```

#### 备注

[](#备注)

```
6-22  2：15 修改命名空间
6-22  2：38 修改readme.me

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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

Unknown

Total

1

Last Release

2884d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15756007?v=4)[李明尚](/maintainers/limingshang)[@limingshang](https://github.com/limingshang)

---

Top Contributors

[![limingshang](https://avatars.githubusercontent.com/u/15756007?v=4)](https://github.com/limingshang "limingshang (14 commits)")

### Embed Badge

![Health badge](/badges/limslock-lock/health.svg)

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[teamtnt/tntsearch

A fully featured full text search engine written in PHP

3.2k3.0M28](/packages/teamtnt-tntsearch)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)

PHPackages © 2026

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