Re: g_io_add_watch can block redraw ?
- From: Havoc Pennington <hp redhat com>
- To: Diego Zuccato <diego otello alma unibo it>
- Cc: Gtk-list <gtk-list gnome org>
- Subject: Re: g_io_add_watch can block redraw ?
- Date: Fri, 6 Dec 2002 11:35:21 -0500
On Fri, Dec 06, 2002 at 08:04:33AM +0000, Diego Zuccato wrote:
> What I still can't understand is HOW IN THE H..L the multithreaded
> version could completly block mouse activity even out of the program
> window when I did a gtk_widget_set sensitive() on a ctree :-( Just it!
> If I removed the set_sensitive it all worked... Bahf! Now it's been
> rewritten for NOT use threads and it works... I hope :-)
Did you read the FAQ on threads? You would need to gdk_threads_enter()
prior to calling the set_sensitive().
> Woops... Is it always safe to call gtk_main_iteration_do(FALSE) ? Seems
> not - from the GIOChannel callback , at least... since if it's
> continuously called it becomes infinite recursion. Any other callback I
> must watch for ?
It's basically safe to call gtk_main_iteration_do() when it's safe to
be "reentrant" (allow just about any other callbacks to run). It's
quite hard to prove/know that code is safe against this, as other
callbacks may destroy objects you're using, or whatever. So I tend to
avoid reentrancy when possible.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]