Re: A question about threads



On Monday 11 December 2006 15:16, Christopher Bland wrote:
I had the same requirement. I also needed to write to a status bar from
my other threads. Based on feedback from this mailing list here is what
worked perfectly for me:

[snip]

That's a good solution, but that is what g_idle_add() does behind the scenes.  
On Unix systems it sets up a pipe and when g_idle_add() is invoked a byte is 
put into the pipe to cause the main loop to invoke the idle handler.  On 
windows it does something different to achieve the same result.

The only difference between the two in terms of the practical effect is that 
the timeout will operate at a higher priority.

Chris




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