Req #53315 [Bgs->Wfx]: can php support threading?
Edit report at http://bugs.php.net/bug.php?id=53315&edit=1
ID: 53315
Updated by: rasmus@php.net
Reported by: yangqingrong at gmail dot com
Summary: can php support threading?
-Status: Bogus
+Status: Wont fix
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: all
PHP Version: 5.3.3
Block user comment: N
New Comment:
Nope, sorry. Use out-of-band solutions like Gearman, or use
event-driven
mechanisms like socket_select/curl_multi. Much more robust than trying
to do
threading in PHP.
Previous Comments:
------------------------------------------------------------------------
[2010-11-15 10:53:21] pajoye@php.net
http://www.php.net/pcntl
------------------------------------------------------------------------
[2010-11-15 10:50:49] yangqingrong at gmail dot com
Description:
------------
Hi sir:
I am a php programmer work in php area for more than 3 years.i have a
suggestion about threading for you. i found than php doesn't support
threading. could you develop threading in the new version?
i think the threading will like this:
<?php
using namespace Php.Threading;
class MyThread extends Thread
{
public $num;
public function __construct()
{
}
public function run()
{
echo $num . "\n";
}
}
$thread1 = new MyThread();
$thread2 = new MyThread();
$thread1->start();
$thread2->start();
?>
Yang Qing-rong
http://www.wudimei.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53315&edit=1
Thread (3 messages)