[852] in The GTK GIMP ToolKit mailing list archive
[gtk-list] GAG and threads
daemon@ATHENA.MIT.EDU (Adam D. Moss)
Tue Aug 26 07:17:05 1997
Date: Tue, 26 Aug 1997 12:10:17 GMT
From: "Adam D. Moss" <adam@uunet.pipex.com>
To: gtk-list@redhat.com
In-Reply-To: <199708261052.MAA00371@hobitin.kraj.cz>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Daniel Skarda writes:
> 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"?
You could process a few lines of your preview, go into the event
handler to check if there are any GTK events pending (eg. the cancel
button has been pressed!), process a few more lines, go into the event
handler, process a few more lines, go into the event handler, process
a few more lines, go into the event handler, process a few more lines,
go into the event handler, process a few more lines, go into the event
handler, process a few more lines, go into the event handler, process
a few more lines, go into the event handler, process a few more lines,
go into the event handler, process a few more lines, go into the event
handler, process a few more lines, go into the event handler, process
a few more lines, uhh... you get the idea.
--Adam
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null