定制 wpdesk/wp-mutex 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

wpdesk/wp-mutex

最新稳定版本:1.1

Composer 安装命令:

composer require wpdesk/wp-mutex

包简介

Library for locking in Wordpress.

README 文档

README

pipeline status coverage report Latest Stable Version Total Downloads Latest Unstable Version License

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

PHPDoc: https://wpdesk.gitlab.io/wp-mutex/index.html

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-16