承接 aboutcoders/process-control 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aboutcoders/process-control

最新稳定版本:1.3.2

Composer 安装命令:

composer require aboutcoders/process-control

包简介

A PHP process control library

README 文档

README

A PHP process control library.

Build Status: Build Status

The interface

The ControllerInterface defines the method doExit() that indicates whether to exist a process.

interface ControllerInterface
{
    /**
     * Indicates whether to exit a process
     *
     * @return boolean
     */
    public function doExit();
}

The PcntlController

The PcntlController listens to PCNTL events to determine whether to exit a process.

    $stopsignals = array(SIGTERM);
    $logger = new Psr\Log\NullLogger();
    
    $controller = new PcntlController($stopsignals, $logger);
    
    while(!$controller->doExit())
    {
        // do something
    }

The ChainController

The ChainController executes multiple controllers in a chain to determine whether to exit a process.

The NullController

The NullController never indicates to exit a process.

Note: This controller can be used as fallback controller for the PcntlController in runtime environments where PCNTL functions to not exist.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-04