wpdesk/wp-mutex
最新稳定版本:1.1
Composer 安装命令:
composer require wpdesk/wp-mutex
包简介
Library for locking in Wordpress.
关键字:
README 文档
README
wpdesk/wp-lock
wp-mutex is a simple library for WordPress plugins to help executing critical code in concurrent situations.
Requirements
PHP 5.5 or later.
Composer
You can install the bindings via Composer. Run the following command:
composer require wpdesk/wp-mutex
To use the bindings, use Composer's autoload:
require_once 'vendor/autoload.php';
Manual installation
If you do not wish to use Composer, you can download the latest release. Then, to use the Notices, include the init.php file.
require_once('/path/to/notice/src/init.php');
Getting Started
Simple usage looks like:
$lock_name = 'my_lock_name';
if ( wpdesk_acquire_lock( $lock_name ) ) {
// do critical stuff
wpdesk_release_lock( $lock_name );
} else {
echo 'Unable to acquire lock!';
}
Project documentation
统计信息
- 总下载量: 40k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-16