Re: gtk2 multithreaded programming win32 issue
- From: "Tor Lillqvist" <tml iki fi>
- To: "Kuang-Chun Cheng" <kcc1967 gmail com>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: gtk2 multithreaded programming win32 issue
- Date: Thu, 28 Aug 2008 16:19:50 +0300
> Could you explain more on this ? Is calling g_idle_add() from
> "NON-GUI" thread important ?
No, you can call it from any thread.
> I think no matter which thread invoke g_idle_add(),
> the idle callback will be associated with default main loop, am I correct ?
Yes.
> Did you put a g_usleep() in your idle callback ? If not, how did you avoid
> the idle callback to take all of the CPU loading ?
Have the idle callback function return FALSE... Schedule it again with
g_idle_add() whenever you have something new that needs to be done in
the GUI thread.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]