Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread Dotan Cohen
> It's just as we sometimes use PHP for doing some big Server works (e.g. > database copying or something) and > it would be nice to controll by yourself which Thread (or process) does which > part of the job. > I don't suppose that the client is sitting there waiting for a reply until the brows

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread Matijn Woudt
On Wed, Oct 31, 2012 at 11:37 AM, Florian Müller wrote: > I actually tought about just the same structures as Java uses(something in > this way: > Thread t = new Thread(new Runnable() {public void run() { > ...blabla }} > I thought this would actually be a good benefit if PHP suppor

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread Larry Garfield
On 10/31/12 1:58 AM, Florian Müller wrote: Hi guys I was wondering, what actually the reason is that PHP itself does not support multi-threading? I guess this would be realizable, or not? If not, why? Maybe this is a stupid question, but still somehow interesting. Realization in a way as Java d

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread ma...@behnke.biz
Ovidiu Farauanu hat am 31. Oktober 2012 um 09:59 geschrieben: > Yes Marco has right. > > But more than that, OOP is mainly designed to run in a single threaded . I don't put a comment on that. > environment and it is not the best idea to be used for concurrent > programming because you wil

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread ma...@behnke.biz
Ovidiu Farauanu hat am 31. Oktober 2012 um 09:59 geschrieben: > Hello Florian, > > Usually you want to run a PHP script in two different environments: > 1. inside a webserver > 2. in a command line interface > > For a web application, the application server does the work for you. > It is the ser

RE: [PHP] Multithreading for OOP PHP

2012-10-31 Thread Florian Müller
...@gmail.com > Date: Wed, 31 Oct 2012 10:59:28 +0200 > To: php-general@lists.php.net > Subject: [PHP] Multithreading for OOP PHP > > Hello Florian, > > Usually you want to run a PHP script in two different environments: > 1. inside a webserver > 2. in a command line i

[PHP] Multithreading for OOP PHP

2012-10-31 Thread Ovidiu Farauanu
Yes Marco has right. But more than that, OOP is mainly designed to run in a single threaded environment and it is not the best idea to be used for concurrent programming because you will need synchronization everywhere and this slows down the code, but also ask for a lot of other troubles. I thin

[PHP] Multithreading for OOP PHP

2012-10-31 Thread Ovidiu Farauanu
Hello Florian, Usually you want to run a PHP script in two different environments: 1. inside a webserver 2. in a command line interface For a web application, the application server does the work for you. It is the server job to have a thread pool and balance it correctly. So you don't need threa

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread ma...@behnke.biz
"Florian Müller" hat am 31. Oktober 2012 um 07:58 geschrieben: > Hi guys > I was wondering, what actually the reason is that PHP itself does not support > multi-threading? > I guess this would be realizable, or not? If not, why? > Maybe this is a stupid question, but still somehow interesting. Rea

[PHP] Multithreading for OOP PHP

2012-10-31 Thread Florian Müller
Hi guys I was wondering, what actually the reason is that PHP itself does not support multi-threading? I guess this would be realizable, or not? If not, why? Maybe this is a stupid question, but still somehow interesting. Realization in a way as Java does (or just something in that way) would act