Re: Multi-threaded UI Freezes on GDK Call
- From: "Michael R. Head" <burner suppressingfire org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Multi-threaded UI Freezes on GDK Call
- Date: Tue, 18 Dec 2007 19:05:06 -0500
On Tue, 2007-12-18 at 18:46 -0500, Michael McCann wrote:
Ahh, ok. How else can I accomplish my goal, then? I need to give GTK the
lock, as I'm calling GDK from another function not in the main GTK loop.
I tried leaving out gdk_threads_enter()/leave() in the CPU-intensive
function, but X gives me errors.
Well, I guess what you need to do is to separate out the CPU intensive
bits of the function from the widget manipulation bits...
my_function() {
compute_real_hard();
gdk_threads_enter();
update_ui();
gdk_threads_leave();
}
Or something like that.
mike
--
Michael R. Head <burner suppressingfire org>
suppressingfire.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]