Re: Multi-threaded UI Freezes on GDK Call
- From: Michael McCann <naetrick comcast net>
- To: Tomas Carnecky <tom dbservice com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Multi-threaded UI Freezes on GDK Call
- Date: Tue, 18 Dec 2007 19:05:18 -0500
Tomas Carnecky wrote:
Michael McCann wrote:
Michael R. Head wrote:
On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote:
I assume you meant
g_threads_init();
gdk_threads_init();
gtk_init();
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
right?
Yes, that is correct. :)
Does your special function take time to do its job? If so, then that
would be why. For example:
...
while(1) {
gdk_threads_enter();
sleep(1)
gdk_threads_leave();
sleep(10)
};
...
you'd freeze your app for a second every 10 seconds.
Ahh, ok. How else can I accomplish my goal, then? I need to give GTK the
Which goal? Describe what your app is supposed to do.
tom
I want to fix the issue of the UI freezing when the CPU-intensive
function, which is on a separate thread and calls GDK, is executed.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]