centraldesktop/parallel 问题修复 & 功能扩展

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

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

centraldesktop/parallel

Composer 安装命令:

composer require centraldesktop/parallel

包简介

Easily allows forking up to a max number of processes

README 文档

README

An easy to use and simple library for doing parallel processing using simple process forks.

All credit should go to the amazing maintainers of Perl's (CPAN) Parallel::ForkManager which I used for about 10 years.

To use:

Add this package to your composer dependencies.

use CentralDesktop\Parallel\ForkManager;

// build an object, limit to total concurrent processes.

You must declare(ticks = 1); in order for signal handing to work properly in PHP

$fm = new ForkManager(10); $fm->start();

while ($fm->alive()) { if ($fm->start()) { continue; }

do_something();

$fm->stop(); } $fm->shutdown_all();

You probably may want to handle specific signals by installing signal handlers.

$fm->set_parent_sighandler(array($this, 'parent_signal_handler'));

$fm->set_child_sighandler(array($this, 'child_signal_handler'));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2013-04-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固