Re: Threads and g_idle_add()



On 08/26/2009 07:57 PM, Marshall Lake wrote:

I have several g_idle_add() calls from within secondary threads.  Is it
okay for a secondary thread to end while an idle function it had added
is still active?

Yup.  All idle functions run in the main thread regardless of from while
thread they're added.  As long as you haven't passed any data to the
idle function that gets freed as a part of the thread exiting, it's fine.

Also, is it alright to call g_idle_add() from within an idle function?
(the initial g_idle_add() call is being done in a secondary thread)

Yes, also fine.

        -brian



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