承接 symfony-bundles/fork 相关项目开发

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

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

symfony-bundles/fork

最新稳定版本:v3.5.0

Composer 安装命令:

composer require symfony-bundles/fork

包简介

SymfonyBundles Fork Library

README 文档

README

SensioLabsInsight

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version License

Installation

Install the library with composer:

composer require symfony-bundles/fork

How to use (only cli-mode)

Create the fork service:

use SymfonyBundles\Fork;

$fork = new Fork\Fork();

Create a task that implements an interface SymfonyBundles\Fork\TaskInterface. For example:

namespace AppBundle\Task;

use SymfonyBundles\Fork\TaskInterface;

class DemoTask implements TaskInterface
{
    public function execute()
    {
        echo "Hello World!\n";
    }
}

Now that the task is created, you can execute her in a plurality processes:

use AppBundle\Task\DemoTask;

$task = new DemoTask();

$fork->attach($task)->run(4)->wait(); // 4 - this is number of subprocesses

And another example:

$task1 = new DemoTask();
$task2 = new DemoTask();
$task3 = new DemoTask();

$fork->attach($task1)->attach($task2)->attach($task3);
$fork->run(); // by default, the optimal number of subprocesses will be determined
$fork->wait();

If you call method wait, the current process (main) will wait while all child processes will be finished.

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固