Re: Clarification of GTK/GDK locking pre GTK 4.0
- From: richard boaz <ivor boaz gmail com>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-list gnome org, Yehouda Harpaz <yeh lispworks com>, Paul Davis <paul linuxaudiosystems com>
- Subject: Re: Clarification of GTK/GDK locking pre GTK 4.0
- Date: Fri, 14 Sep 2012 17:02:31 +0200
if you're only using GTK+ for an application, and you're not using
threads directly, then you can skip the gdk_threads_add_* API, and use
the GMainLoop API for idle and timeout sources.
not using threads directly? what's an indirect thread?
i too was confused that it seems g_idle_add() is not recommended in this discussion. but i use it everywhere in my code to ensure that g_idle_add()ed callbacks execute as part of the main loop, so to guarantee single concurrency, alleviating the need for a lock, whatever its name (and it works just grand).
perhaps better explained by example situations? which situation disallows g_idle_add(), requiring GDK locks/etc.? and when is g_idle_add() 100% thread-safe?
i know you've tried to explain this in the above, but i don't get the difference (and would really like to make sure i understand this thoroughly).
ricahrd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]