GAG and threads




  Hello,

    during development of GAG plug-in for GIMP I ran accros one conception
problem (GAG is plug-in for evolving nice patterns using genetic algorithm - you
can download it from ftp://atrey.karlin.mff.cuni.cz/pub/local/0rfelyus). As you
may know computation of textures from expressions is sometimes very expensive
and time consuming, waiting for larger preview could be painful even on fast
computer. Unfortunately during these computations gtk is "sleeping" so it is not
possible to interupt them (I am talking about previews not rendering of final
picture. Rendering of final picture is handled by gimp_progress_* functions so
it can be interupted with no problem).

    Shall I use threads (I have to say that for me using thread is "hic sunt
leones") - or there is another (simplier, smarter, cleaner, small effort, small
overhead... ) way to make "interupt preview button" and keep gtk vigilant
even though program performs "heavy computations"?
  
Thank you for your advices.

Dan

     



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]