Re: how to stop a function blocking my app?
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: gtk-list gnome org
- Subject: Re: how to stop a function blocking my app?
- Date: Wed, 7 Feb 2001 23:42:15 +0100
On 2001.02.07 19:47:00 +0100 Paul Davis wrote:
> >if a button is pressed, the function connected to it will block the
> >function until it is completed. Is there any way to prevent this? I'd
> need
> >to keep control over the application while the process called by the
> button
> >click is running.
>
> you need to run the button function in its own thread. see the GTK+
> FAQ for more ideas on how to do this. this is one of the most standard
> problems in GUI programming.
This sounded good. But.....(there's always a but): when I make a thread of
the function executed by pressing the button, it forms a thread, that is
okay. But this thread needs some input from the main application. But when
I do that, nothing happens and if the thread is closed, it complains about
async-state (doh, I changed some variables) and gives a segmentation fault.
But is there any way to "flush" these variables so that the separate thread
also regonizes these changes? That would be real threading.
Ronald
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]