diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-09-16 13:32:45 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-02-09 14:32:55 +0000 |
commit | b5528d7ff526d700aab5b9e11aed871180d4f81e (patch) | |
tree | c83168ab9d5cca7235d847ab16028d971acb6592 /dbus | |
parent | c0d1ffc09b5b008fe9b3ee09330ad663927669af (diff) | |
download | dbus-glib-b5528d7ff526d700aab5b9e11aed871180d4f81e.tar.gz |
Require a modern libdbus and a modern GLib
This means we can assume that GLib and libdbus are thread-safe by
default.
Also explicitly document that the object-mapping layer of dbus-glib
is not thread-safe.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64214
Reviewed-by: Colin Walters <walters@verbum.org>
[with review comments to be fixed in subsequent commit -smcv]
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-gthread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbus/dbus-gthread.c b/dbus/dbus-gthread.c index 5d937b3..a88141b 100644 --- a/dbus/dbus-gthread.c +++ b/dbus/dbus-gthread.c @@ -37,14 +37,17 @@ * once and must be called prior to calling any * other function in the D-BUS API. * + * Equivalent to dbus_threads_init_default(), which does nothing. + * dbus-glib requires dbus >= 1.8, which is thread-safe by default. + * + * Note that dbus-glib's GObject mapping is explicitly *not* thread-safe. + * * Deprecated: New code should use GDBus instead. GDBus is always * thread-safe, whereas dbus-glib is never thread-safe. */ void dbus_g_thread_init (void) { - if (!g_thread_supported ()) - g_error ("g_thread_init() must be called before dbus_threads_init()"); - + /* keep this pointless method call just in case */ dbus_threads_init_default (); } |