Re: How to handle long I/O operations
- From: "Tara M" <learfox furry ao net>
- To: "LIST: GTKAppDevel" <gtk-app-devel-list gnome org>
- Subject: Re: How to handle long I/O operations
- Date: 13 Aug 2001 14:32:03 PDT
On Mon, 13 Aug 2001 21:00:58 +0200, Markus Lausser said:
> - in function_calculating
> /* My heavy calculus */
> /* ... */
> /* calculus finished */
> gtk_idle_remove(idIdle);
> gtk_timeout_remove(idTimeout);
>
> Will it work as I'm expecting (excuting the calculus while showing an
> activity bar and the calculus is execute only once!) ?
no. you forgot to call the gtk_main_iteration() manually.
I don't recommend using gtk_main_iteration() as that can produce
reenterant situations and then you'll have to make all your
callbacks thread safe without even using threads.
The progress bar will be updated as soon as control leaves the
function that updated it and returns to the last gtk_main level.
You only need gtk_main_iteration() if you want to update
a progress bar several times within one non-reenterant
control.
--
--
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]