Re: How to handle long I/O operations



Hello,

First a big thanks to Markus, Tara and Luciano for their help. It helped me
understand better the timeout, idle and "threads" in Gtk.
But like Markus mentioned it, it will be hard for me to use the timeout as I
have no clue of how long the computation will take (it's kind of heavy
mathematical computation involving matrix and "3D" representation of
thousands of points in a geodesic origin, it can take a few hours up to a
few days! Depending on the precision the user ask, and how many points are
involved) So if my calculation exceed the timeout period I guess I will got
a crash (if it behaves like in a real-time environment) So I guess the
gtk_idle_add looks more appropriate.
And thanks Tara for the warning for the "thread safe" problem that might
occur while using gtk_main_iteration.



PS: I'm really sorry for my english, but sometimes it is really torturing to
be able to put the words in the right order, sometimes I have all this
english words in mind but can't figure out how to place them!


Best regards,
---
Jean-Christophe Berthon

Cap Gemini -- Ernst & Young
France
Skill Integration System -- Image Quality
Email: Jean-Christophe Berthon cgey com
Tel: (+33) 561 31 6639


----- Original Message -----
From: "Tara M" <learfox furry ao net>
To: "LIST: GTKAppDevel" <gtk-app-devel-list gnome org>
Sent: Monday, August 13, 2001 11:52 PM
Subject: Re: How to handle long I/O operations



On Mon, 13 Aug 2001 23:37:43 +0200, Markus Lausser said:

 The disadvantage of this solutions is:
 * if the working callback needs more time than you have specified for
the
   gtk timeout then your application will freeze.

Are you sure?  I've used this approach on a raytracer and never
had anything freeze.


 I have implemented such a thing to move files from one location to
another.
 It simply uses the gtk_idle_add function. The only difference is that
the
 working function is not called every X mseconds but if there is time to
do
 that.

Are you suggesting gtk_idle_add instead?  If so that's what I suggested
later on too.


--
--
Sincerely,     ,"-_ \|/
-Capt. Taura M.     , O=__ --X--
.__      ,_JNMNNEO=_ /|\
OMNOUMmnne.      {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.       'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe        '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.    "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.   __  7EMMMNNNNNWWWEEEEEEEOO.   " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
  http://furry.ao.net/~learfox/



_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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