Skip to content

clothesmake/tast-process

This branch is up to date with xujiajun/tast-process:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e66a5b4 · Jul 11, 2017

History

3 Commits
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017
Jul 11, 2017

Repository files navigation

tast-process

An extension providing multi process for PHP 7

Requirements

  • PHP7.0+

Installation

git clone https://github.com/xujiajun/tast-process.git
cd tast-process
phpize
./configure
make && make install

Quick Start

<?php

if (!extension_loaded('tast_process')) {
    echo "tast_process extension is not enabled\n";
    exit(1);
}

function func1()
{
    echo "call func1.start".PHP_EOL;
    sleep(5);
    echo "call func1.end".PHP_EOL;
}
function func2()
{
    echo "call func2.start".PHP_EOL;
    sleep(5);
    echo "call func2.end".PHP_EOL;
}
function func3()
{
    echo "call func3.start".PHP_EOL;
    sleep(5);
    echo "call func3.end".PHP_EOL;
}

// multi process 
tast_process(['func1','func2','func3'],3);

License

MIT Licensed

About

An extension providing multi process for PHP 7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 79.2%
  • M4 12.6%
  • PHP 6.0%
  • JavaScript 2.2%