Re: gtk2 multithreaded programming win32 issue



Hi,

2008/8/28 Kuang-Chun Cheng <kcc1967 gmail com>:
> My GUI require update after some non-gui thread finish it's task.
>
> So I create an idle callback + GAsyncQueue in main thread.
> When non-gui thread push message to GAsyncQueue, my idle callback will
> be wakeup and do the GUI update.

You don't need the GAsyncQueue. Just call g_idle_add() from the
non-gui thread and the idle callback will run in the gui thread next
time the main loop is idle. I do this in my app and it works well on
linux and windows.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]