Re: Concurrent processes

2001-04-03 Thread Paul Davis
>Is there a way to let me change parameters ? Maybe lookup signals or >somenthing like that ? I've heard something about threads but I don't >know what it is I'm really a newbie so if someone could give me some >very detailled way to do this, it would be very nice. nobody is going to give you

Re: Concurrent processes

2001-04-03 Thread Joshua Horvath
If you don't need a full-fledged thread, you can just stick while (gtk_events_pending()) gtk_main_iteration(); somewhere appropriate in your calculation function. This will allow GUI events to be processed from within the calculation loop. -Josh Valery Avaux wrote: > > Hello, > > I'

Re: Concurrent processes

2001-04-03 Thread Hal Greenwald
Paul, My experience has been that it is a big mistake to distribute GTK calls (or any X based widget set for that matter) among threads. I use use multi-threading, however the gui controls live in a single thread. Hal At 05:48 PM 4/3/01 -0400, Paul Davis wrote: > >Is there a way to let me cha

Re: Concurrent processes

2001-04-03 Thread Valery Avaux
I don't really need to have totally threaded functions but I would like to be able to change the values of two parameters while the main part of the simulation runs. Here follows parts of the code I currently use: int main (int argc, char *argv[]) { GtkWidget *temper; GtkWidget *magnfield;

Re: Concurrent processes

2001-04-03 Thread Eric M. Monsler
One key question is, does the parameter change need to cause a calculation restart? I would presume so, unless the computation was convergence-based. In that case, you'll presumably need to modify isingflip() whatever approach you take. if you previously had: isingflip() { /* setup loop code

Re: Concurrent processes

2001-04-03 Thread Paul Davis
>Paul, >My experience has been that it is a big mistake to distribute >GTK calls (or any X based widget set for that matter) among threads. >I use use multi-threading, however the gui controls live in a single >thread. Right, I concur, and I do exactly the same thing. However, it does make li

RE: Concurrent processes

2001-04-04 Thread Hugues Bernard
Salut ! > Hello, > > I'm trying to build up a physics simulation with Glade and GTK. The main > function of the simulation is a function called isingflip(). This > function must do interations up to 100 times but the calculation is > based on two variables controlled by two scrollbars define

Re: Concurrent processes

2001-04-04 Thread Helmethead
On Tue, Apr 03, 2001 at 11:31:44PM +0200, Valery Avaux wrote: > Hello, > > I'm trying to build up a physics simulation with Glade and GTK. The main > function of the simulation is a function called isingflip(). This > function must do interations up to 100 times but the calculation is > based