summaryrefslogtreecommitdiff
path: root/gdk/gdk.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-07-28 17:23:17 +0200
committerMatthias Clasen <mclasen@redhat.com>2012-07-30 18:01:47 +0200
commit0ac56e9dcc526d07975feeb1a297640a8452525b (patch)
tree8361203874819948489af4780b3661a6b29c18de /gdk/gdk.c
parent746b9d7c414884ec68ee46865f58a31afa072ce2 (diff)
downloadgtk+-0ac56e9dcc526d07975feeb1a297640a8452525b.tar.gz
gdk: Deprecate thread functions
This commit deprecates gdk_threads_init, gdk_threads_enter, gdk_threads_leave and gdk_threads_set_lock_functions. Using GTK+ from multiple threads does not work at all on Windows, and is problematic on other platforms as well. We want to move to a world where all GTK+ calls are made from the main thread. Use g_main_context_invoke, g_idle_add and related functions if you need to schedule GTK+ calls from other threads. http://bugzilla.gnome.org/show_bug.cgi?id=680754
Diffstat (limited to 'gdk/gdk.c')
-rw-r--r--gdk/gdk.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 3c8c71153b..cf81863a1d 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -663,6 +663,9 @@ gdk_init (int *argc, char ***argv)
* GDK and GTK+ functions can be called safely and without causing race
* conditions. Only one thread at a time can be in such a critial
* section.
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_enter (void)
@@ -675,6 +678,9 @@ gdk_threads_enter (void)
* gdk_threads_leave:
*
* Leaves a critical region begun with gdk_threads_enter().
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_leave (void)
@@ -703,6 +709,9 @@ gdk_threads_impl_unlock (void)
*
* This call must be made before any use of the main loop from
* GTK+; to be safe, call it before gtk_init().
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_init (void)
@@ -740,6 +749,9 @@ gdk_threads_init (void)
* This method must be called before gdk_threads_init(), and cannot
* be called multiple times.
*
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
+ *
* Since: 2.4
**/
void