Suljettu

Setup pcntl_fork() for multiple include files

[url removed, login to view]

threads = 0;

}

// dispatch a new thread

function dispatch($file)

{

$this->threads++;

// start new thread

$pid = pcntl_fork();

if($pid == -1) // fork failed

{

return false;

}

elseif ($pid > 0) // parent

{

return true;

}

else // child

{

// include requested file

include($file);

exit;

}

}

// wait for all threads to finish

function wait(&$status = null)

{

//wait for each thread to finish

for ($i=0; $i threads; $i++)

{

pcntl_wait($status);

}

}

}

?>

dispatch("[url removed, login to view]");

$async->dispatch("[url removed, login to view]");

$async->dispatch("[url removed, login to view]");

$async->wait();

?>

This Code print Results in Page.

But i want all output in $string after closing all functions and classes.

Page : a,b,[url removed, login to view] ( Normal CURL requests.

$markup="something"; echo $markup;

Requirements :

1 : php parallel processing

2 : get all output in string at end of code..

3 : Show output only when we want to use. means ( echo $string; ) .

3 : speed improvements (don't make it heavy code).

Taidot: PHP

Näytä lisää: string processing in c, async, php curl http code, setup finish, php speed improvements, thread curl, php elseif, async return, php echo print, curl thread, php thread function, php exit child, string processing, echo file php, php echo file, php wait function, parallel processing, curl net, code pid, php pcntl_fork, curl async, pcntl_fork, net async http requests, php setup, function thread

Tietoa työnantajasta:
( 0 arvostelua ) malout, India

Projektin tunnus: #4262752

3 freelanceria on tarjonnut keskimäärin 37 $ tähän työhön

genkov

That's not possible without shmop or some other IPC, like a simple temporary SQLite db or better yet flatfile-based IPC and aggregation. Bid is for consulting and support only. Contact me for more information.

30 $ USD 3 päivässä
(19 arvostelua)
5.7
linuxfreak1985

Hi there, We are experts in PHP Open Source (any kind of PHP/MySQL work),wordpress and Ajax/Web 2.0 technology. Some of the projects we completed for php are mentioned below [url removed, login to view] Lisää

30 $ USD 10 päivässä
(56 arvostelua)
5.7
aczireonline

Hi, Will get this done. I do have multithreading experience with PHP and I know how to pass data between forked clients and server. Please contact asap.

50 $ USD 1 päivässä
(35 arvostelua)
4.9