Re: pthreads - code thoughts....

From: Date: Wed, 05 Sep 2001 13:28:00 +0000
Subject: Re: pthreads - code thoughts....
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-43@lists.php.net to get a copy of this message
On Wed, 05 Sep 2001, Alan Knowles wrote: > Hi, > > After playing with php-gtk a bit further, it became obvious that the lack of pthreads support > is a serious problem. - > the simple example was, creating a tree that browsed the filesystem. > > when loaded, it scans 2 levels of directories. and when opened it then scans the levels below > this. > > If done without threads, the GUI freezes for quite a time on loading large directories. > > using threads (in python) it is possible to make this work nicely... > > Below is a _NON_WORKING_ attempt at adding thread support to the pcntl module.. > > I would have posted to php-dev, but Im not sure it will get much attention...... (especially as > it doesnt work!) > > anyway thoughts would be appreciated... - like 'the concept is broken....' etc. I'd like to avoid using threads as much as possible. To resolve your problem, you probably need to catch Gtk+ events and process them while you are scanning the directories. while (gtk::events_pending()) gtk::main_iteration(); -Andrei The Heineken Uncertainty Principle: You can never be sure how many beers you had last night.

« previous php.gtk.general (#43) next »