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

Re: [PHP] Multithreading in PHP

2009-03-18 Thread Alpár Török
2009/3/17 Manoj Singh : > Hi Alpar, > > Thanks for reply. > > Actually the form is submitted through ajax request and the validation is > checking on the server side. So if any error occurs on submission of form, > then we are displaying the errors to the user. And is there is no error, > then the

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Sudheer Satyanarayana
Manoj Singh wrote: Hi Sudheer, Can you please put more focus or sample code for the second option which you have suggested "Send the email after you flush the output.". http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net -- PHP General Mailing List (h

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Manoj Singh
Hi Sudheer, Can you please put more focus or sample code for the second option which you have suggested "Send the email after you flush the output.". Regards, Manoj On Tue, Mar 17, 2009 at 7:28 PM, Sudheer Satyanarayana < sudhee...@binaryvibes.co.in> wrote: > Manoj Singh wrote: > >> Hi Guys, >>

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Sudheer Satyanarayana
Manoj Singh wrote: Hi Guys, I am creating a page which submits the form through Ajax request & the submitted page is sending the mails to n number of users. Now until the mail sends or the page process completed the end user has to wait. Is it possible that server sends the response to the clie

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Jo�o C�ndido de Souza Neto
My suggestion is that you can start a second ajax as soon as the response about validating data is returned to process everithing you need and so your user wont wait until the process is finished. João Cândido "Manoj Singh" escreveu na mensagem news:3859a530903170639m6c2af2b2s941446a31103c.

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Alpár Török
2009/3/17 Manoj Singh : > Hi Guys, > > I am creating a page which submits the form through Ajax request & the > submitted page is sending the mails to n number of users. Now until the mail > sends or the page process completed the end user has to wait. > > Is it possible that server sends the respo

Re: [PHP] Multithreading in PHP

2009-03-17 Thread Manoj Singh
Hi Alpar, Thanks for reply. Actually the form is submitted through ajax request and the validation is checking on the server side. So if any error occurs on submission of form, then we are displaying the errors to the user. And is there is no error, then the submitted page started processing. So

[PHP] Multithreading in PHP

2009-03-17 Thread Manoj Singh
Hi Guys, I am creating a page which submits the form through Ajax request & the submitted page is sending the mails to n number of users. Now until the mail sends or the page process completed the end user has to wait. Is it possible that server sends the response to the client & then start proce

[Fwd: Re: [PHP] multithreading]

2008-06-04 Thread Aschwin Wesselius
hce wrote: Hi, 1. Does PHP support multithreading? Yes, it does. I suspect a reply from Manuel Lemos about a multithreading class on www.phpclasses.org at any time now.;-) No kidding, I've tested a class from phpclasses.org and it worked. Can't find the library on my computer(s) right n

Re: [PHP] multithreading

2008-06-04 Thread Bojan Tesanovic
Hey Jim, for what do you need multithreading there can be some way to do some "multithreading" in PHP via some "hacks" On Jun 4, 2008, at 1:57 PM, hce wrote: Hi, 1. Does PHP support multithreading? 2. When using PHP to access MySQL, does PHP implents a single thread or multithread with MySQ

Re: [PHP] multithreading

2008-06-04 Thread Per Jessen
hce wrote: > Hi, > > 1. Does PHP support multithreading? > Not really, no. If you genuinely need multi-threading, use C or C++. > 2. When using PHP to access MySQL, does PHP implents a single thread > or multithread with MySQL? Single thread. /Per Jessen, Zürich -- PHP General Mailing L

Re: [PHP] multithreading

2008-06-04 Thread Wolf
hce <[EMAIL PROTECTED]> wrote: > Hi, > > 1. Does PHP support multithreading? Depends > 2. When using PHP to access MySQL, does PHP implents a single thread > or multithread with MySQL? Depends STFW and RTFM Here's some basics to get you started: http://www.google.com/search?q=PHP%3A+Mul

[PHP] multithreading

2008-06-04 Thread hce
Hi, 1. Does PHP support multithreading? 2. When using PHP to access MySQL, does PHP implents a single thread or multithread with MySQL? Thank you. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] multithreading

2002-05-15 Thread Andrew Milne
I have a PHP script that is run hourly by cron; I would like to make this multithreading rather than configure cron to run the script more than once per hour. Is this possible using PHP? I've tried using ticks, but it doesn't appear to work - the tick function doesn't execute more than once at t