thruster/process-exit-handler

Thruster ProcessExitHandler 组件

1.0.0 2016-01-12 15:43 UTC

This package is auto-updated.

Last update: 2024-09-14 03:08:37 UTC


README

[最新版本] (https://github.com/ThrusterIO/process-exit-handler/releases) [软件许可] (LICENSE) [构建状态] (https://travis-ci.org/ThrusterIO/process-exit-handler) [代码覆盖率] (https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler) [质量评分] (https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler) [总下载量] (https://packagist.org.cn/packages/thruster/process-exit-handler)

[邮箱] (mailto:team@thruster.io)

Thruster ProcessExitHandler 组件。处理所有子进程退出

安装

通过 Composer

$ composer require thruster/process-exit-handler

使用方法

use Thruster\Component\EventLoop\EventLoop;
use Thruster\Component\ProcessExitHandler\ExitHandler;
use Thruster\Component\ProcessExitHandler\ExitEvent;

$loop = new EventLoop();
$exitHandler = new ExitHandler($loop);

$exitHandler->addHandler(function (ExitEvent $event) {
    // ... Handle event
});

$loop->run();

测试

$ composer test

贡献

请参阅贡献指南行为准则以获取详细信息。

许可证

有关更多信息,请参阅许可证文件