austgl / phpws

Automatically exported from code.google.com/p/phpws
0 stars 0 forks source link

multi-threaded server using pcntl_fork #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
give a point for pcntl_fork.

where is the position to insert pcntl_fork?

I don't get it well.

$pid = pcntl_fork();
if($pid==-1){
//failed
}
elseif($pid){
//parent
}
else{
//child
}

Original issue reported on code.google.com by snjn...@gmail.com on 20 Nov 2012 at 3:51

GoogleCodeExporter commented 9 years ago
Unfortunately I have no idea. Why do you need a multithreaded server?

Original comment by ch...@devristo.com on 15 Dec 2012 at 11:02

GoogleCodeExporter commented 9 years ago
for real-time gaming. and time checking and so on.. 

for using while(1){}

Original comment by snjn...@gmail.com on 21 Dec 2012 at 10:34