Re: [PHP-GTK] Multi-threading in PHP
[email protected] ("James Moore") Sat, 11 Aug 2001 14:14:49 +0100
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <015901c12267$9a9cd5b0$84d47ad5@hound> |
PHP doesnt currently support threading. I dont think there are plans for it to either, there is a program control extension. The desired effect can be achived by either using that or exec and using semaphores, database and then files, use the fastest the client has avalible at the time, IE check to see if semaphores are avalible otherwise check for DB then finally check for a file based approach. - James ----- Original Message ----- From: "Daniel Adams" <[email protected]> To: "Sander Roobol" <[email protected]> Cc: <[email protected]> Sent: Saturday, August 11, 2001 2:08 PM Subject: Re: [PHP-GTK] Multi-threading in PHP > Doesn't glib have supports for threads or is that just thread-safe > functions that I am thinking of. I have run into this before; threads > would be useful in some situations and since php already supports > semaphores and shared mem, this seems only right to support threads also > although I'm not sure how difficult that would be to accomplish. > - Dan > > On Sat, 11 Aug 2001, Sander Roobol wrote: > > > Is it possible to create multi-threaded applications using PHP? > > I know that this is not a specific PHP-GTK question, but I think it's only > > usefull in stand-alone applications. > > > > What I want sounds simple: I want to download multiple files via HTTP (using > > fsockopen, fgets, fputs, etc) while the GUI keeps responding to userinput > > (ie., to cancel one of the downloads). > > > > A possibility is to create multiple instances of a php-script (using exec or > > something), but I can't think of a good way to communicate between the > > instances. I don't want to use a database (most client-computers don't have > > MySQL running), and using files to communicate seems to slow because you > > need to check for changes every second or so. > > > > Any ideas? > > > > Thanks in advance, > > > > Sander > > > > > > > > -- > > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > To contact the list administrators, e-mail: [email protected]