pastuhov/yii2-redis-mutex 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pastuhov/yii2-redis-mutex

最新稳定版本:v0.2.1

Composer 安装命令:

composer require pastuhov/yii2-redis-mutex

包简介

Yii2 Redis mutex.

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Total Downloads

Install

Via Composer

$ composer require pastuhov/yii2-redis-mutex

Features

  • Deadlock free
  • Robust

Disadvantages

  • no spinlock
  • non distributed

Usage

$mutex = \Yii::createObject([
	'class' => \pastuhov\yii2redismutex\RedisMutex::className(),
	'redis' => $redisConnection
]);

$mutexName = 'lock';

if ($mutex->acquire($mutexName)) {
	$value++;
	$mutex->release($mutexName);
}

Testing

$ composer test

or

$ phpunit

Debugging

For debugging purposes use:

$ redis-cli monitor

or

$ tail -f tests/runtime/logs/app.log -n 1000

Security

If you discover any security related issues, please email kirill@pastukhov.su instead of using the issue tracker.

Credits

License

GNU General Public License, version 2. Please see License File for more information.

统计信息

  • 总下载量: 26.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-01-19