13dagger/mutex
Composer 安装命令:
composer require 13dagger/mutex
包简介
Simple MutEx lock implementation based on directory creation
关键字:
README 文档
README
Simple MutEx lock implementation.
Gives you the easy way to check that your script runs as the only instance.
Basics
- try to lock, if ok -> run your program, else stop
- unlock when finished the job
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
install:
./install
lock:
mutex lock some_action
unlock:
mutex unlock some_action
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-11-08