summaryrefslogtreecommitdiff
path: root/client/gvfsdaemondbus.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-06-25 13:01:48 +0200
committerBenjamin Otte <otte@gnome.org>2009-06-25 13:01:48 +0200
commitc372064a04f8c24efdb99a3b0811bd17ddfb2176 (patch)
tree61906e539114b76be2d7c82c384688f50bada002 /client/gvfsdaemondbus.h
parent133bd0ec75a94b8316b56c252dfc62a3ed23fade (diff)
downloadgvfs-c372064a04f8c24efdb99a3b0811bd17ddfb2176.tar.gz
try extra hard to make sure operations get cancelled properly
Previously there were some rather big windows that allowed for races between cancelling and calling g_simple_async_result_complete(). This code makes sure we check for cancellaton right before calling g_simple_async_result_complete(), which gets rid of that window and gives you the guarantee that cancelling an operation in the main thread will indeed return a CANCELLED error.
Diffstat (limited to 'client/gvfsdaemondbus.h')
-rw-r--r--client/gvfsdaemondbus.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/gvfsdaemondbus.h b/client/gvfsdaemondbus.h
index 7a132cdc..c60108f5 100644
--- a/client/gvfsdaemondbus.h
+++ b/client/gvfsdaemondbus.h
@@ -75,6 +75,10 @@ DBusMessage * _g_vfs_daemon_call_sync (DBusMessage
GFileInfo * _g_dbus_get_file_info (DBusMessageIter *iter,
GError **error);
+void _g_simple_async_result_complete_with_cancellable
+ (GSimpleAsyncResult *result,
+ GCancellable *cancellable);
+
G_END_DECLS
#endif /* __G_VFS_DAEMON_DBUS_H__ */