autoframe/process-control 问题修复 & 功能扩展

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

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

autoframe/process-control

最新稳定版本:1.0.1

Composer 安装命令:

composer require autoframe/process-control

包简介

Process child worker, execution lock check, Autoframe Framework

README 文档

README

Build Status License: The 3-Clause BSD License Packagist Version Downloads

PHP worker instance create and inter process lock check Autoframe Framework

/** Concrete implementation that uses the php temporary folder to store the lock */
namespace Autoframe\Process\Control\Lock;
class AfrLockFileClass implements AfrLockInterface
...
interface AfrLockInterface
{
    /** Check if the lock is in place */
    public function isLocked(): bool;

    /** Creates a new lock or fails */
    public function obtainLock(): bool;

    /** Returns false if lock is in place and the lock file can't be closed
     *  Returns true if there is no lock in place or operation was successfully made */
    public function releaseLock(): bool;

    /** Returns Process ID for the lock thread or zero if other case */
    public function getLockPid(): int;
}
/** Concrete implementation for create (spawn) worker process in background */
namespace Autoframe\Process\Control\Worker\Background;
class AfrBackgroundWorkerClass implements AfrBackgroundWorkerInterface
...
interface AfrBackgroundWorkerInterface
{
    /** Returns /usr/bin/php or C:\xampp\php\php.exe or php */
    public static function getPhpBin(): string;

    /** Calls: php $execFileArgs > /dev/null & or widows equivalent start /B */
    public static function execWithArgs(string $execFileArgs): void;
}

统计信息

  • 总下载量: 123
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-26