rlock:php redis 锁

时间:2024-07-31 05:02:51
【文件属性】:

文件名称:rlock:php redis 锁

文件大小:11KB

文件格式:ZIP

更新时间:2024-07-31 05:02:51

PHP

锁 Redis 锁用于一些原子操作。 使用 Composer 安装: " require " : { " eleme/rlock " : " ~0.3 " } 用法 锁 <?php use Eleme \ Rlock \ Lock ; use Predis \ Client ; require_once (__DIR__. '/../vendor/autoload.php' ); $ redis = new Client (); $ lock1 = new Lock ( $ redis , 'lock1' ); $ lock1 -> acquire (); // release it by manually or it will be autoreleased. $ lock1 -> release (); // pass some options like timeout


【文件预览】:
rlock-master
----.gitignore(50B)
----Makefile(219B)
----src()
--------Lock.php(3KB)
--------Predis.php(203B)
--------Provider()
--------Factory.php(288B)
----.travis.yml(352B)
----LICENSE(1KB)
----composer.json(647B)
----examples()
--------signal.php(340B)
--------predis.php(184B)
--------lock.php(702B)
--------factory.php(170B)
----README.md(2KB)
----tests()
--------LockTest.php(3KB)
--------FactoryTest.php(373B)
--------PredisTest.php(332B)
--------Provider()
----.scrutinizer.yml(177B)
----phpunit.xml.dist(813B)

网友评论