承接 mkraemer/react-pcntl 相关项目开发

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

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

mkraemer/react-pcntl

Composer 安装命令:

composer require mkraemer/react-pcntl

包简介

PCNTL bindings for ReactPHP

关键字:

README 文档

README

Since v0.5 of ReactPHP event-loop offers native support for signal handling.

React-PCNTL

Build Status Coverage Status

Basic PCNTL bindings for React PHP.

Install

The best way to install this library is through composer:

{
    "require": {
        "mkraemer/react-pcntl": "^3.0.*"
    }
}

This library depends on the PCNTL extension. Note: version 2 of this library requires PHP >= 5.4. If you are using PHP 5.3, use the 1.0.* version:

{
    "require": {
        "mkraemer/react-pcntl": "1.0.*"
    }
}

Usage

This library provides the PCNTL class which taskes an event loop and optionally the timer interval in which the PCNTL signals should be read as constructor arguments. After initializing the class, you can use the on() method to register event listeners to PCNTL signals.

$loop = React\EventLoop\Factory::create();
$pcntl = new MKraemer\ReactPCNTL\PCNTL($loop);

$pcntl->on(SIGTERM, function () {
    // Clear some queue
    // Write syslog
    // Do ALL the stuff
    echo 'Bye'.PHP_EOL;
    die();
});

$pcntl->on(SIGINT, function () {
    echo 'Terminated by console'.PHP_EOL;
    die();
});

echo 'Started as PID '.getmypid().PHP_EOL;
$loop->run();

统计信息

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

GitHub 信息

  • Stars: 57
  • Watchers: 4
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固