Support g_main_context_push_thread_default() in gio

GFile allows for the possibility that external implementations may not
support thread-default contexts yet, via
g_file_supports_thread_contexts(). GVolumeMonitor is not yet
thread-default-context aware.

Add a test program to verify that basic gio async ops work correctly
in non-default contexts.

http://bugzilla.gnome.org/show_bug.cgi?id=579984
This commit is contained in:
Dan Winship
2009-06-16 20:22:58 -04:00
parent 4363f1932f
commit 65cc5d895a
23 changed files with 474 additions and 121 deletions

View File

@@ -188,7 +188,7 @@ g_socket_input_stream_read_async (GInputStream *stream,
g_source_set_callback (source,
(GSourceFunc) g_socket_input_stream_read_ready,
g_object_ref (input_stream), g_object_unref);
g_source_attach (source, NULL);
g_source_attach (source, g_main_context_get_thread_default ());
g_source_unref (source);
}
else