Re: Is threading possible in PHP-GTK
| From: | Chris Chabot | Date: | Fri, 30 Mar 2001 19:13:38 +0000 |
| Subject: | Re: Is threading possible in PHP-GTK | ||
| References: | 1 2 3 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1224@lists.php.net to get a copy of this message | ||
There are always 2 ways around a problem ... depening on the kind of
situation, for which you need threading, there are always posibilities
forinstance
main program:
create lock (file of semaphore), aquire lock
create fifo (shared mem or file, socket etc)
for i in threads do exec('client program &');
stuff 'todo data' in fifo
release lock
while sleep 1 (or microsecond sleep for fine grained status updates)
get lock
get status / stuff data in fifo if needed
release lock
if termination reached break
client:
while (1)
get lock
get todo data from shared mem/file/sock
release lock
if done, or no data
break
else
process data
Its not true threading, but in a lot of situations, it is sufficient...
ofcource you can swap around objects/params (using serialise) between
processes to if required ..
-- Chris
Vinay wrote:
> Hello friends,
>
> > No, it's not. PHP doesn't support multi-threading.
>
> Can i expect that feature in future! Coz without that i am struct at point!
>
> Thanks again!
> Vinay
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net