Re: Threads & popup windows under mswin



On Sun, 2004-06-13 at 16:24, Tim Evans wrote:
Michael Torrie wrote:

The problem is that I can't tell you exactly how to do all this (the
inter-thread communication) under windows.

The easiest way to do it under GTK+ is g_idle_add.  Called from your 
processing thread, it will tell the main loop to run the given function 
as soon as the main loop isn't doing anything else.  Make sure that the 
function that you pass it returns FALSE so that it only gets called once.

This only works when you use non-blocking I/O calls (asynchronous I/O). 
GNET abstracts this nicely anyway, so why not use it.  His current
problem is that many things he is doing do block, and so g_idle_add
won't quite be sufficient.
-- 
Michael Torrie <torriem chem byu edu>



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