Download the PHP package limslock/lock without Composer
On this page you can find all versions of the php package limslock/lock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download limslock/lock
More information about limslock/lock
Files in limslock/lock
Download limslock/lock
More information about limslock/lock
Files in limslock/lock
Vendor limslock
Package lock
Short Description redis lock https://github.com/zhaocong6/lock 根据大佬修车工修改完成
License MIT
Package lock
Short Description redis lock https://github.com/zhaocong6/lock 根据大佬修车工修改完成
License MIT
Please rate this library. Is it a good library?
Informations about the package lock
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
All versions of lock with dependencies
PHP Build Version
Package Version
The package limslock/lock contains the following files
Loading the files please wait ....