thruster / process-exit-handler
Thruster ProcessExitHandler 组件
1.0.0
2016-01-12 15:43 UTC
Requires
- php: >=7.0
- thruster/event-emitter: ~1.0
- thruster/event-loop: ~1.0
Requires (Dev)
- phpunit/phpunit: ~5.0
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)
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
贡献
许可证
有关更多信息,请参阅许可证文件。