php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53315 can php support threading?
Submitted: 2010-11-15 10:50 UTC Modified: 2010-11-15 10:54 UTC
From: yangqingrong at gmail dot com Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 5.3.3 OS: all
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-11-15 10:50 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-15 10:53 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-11-15 10:54 UTC] rasmus@php.net
-Status: Bogus +Status: Wont fix
 [2010-11-15 10:54 UTC] rasmus@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 09:01:29 2024 UTC