diff options
author | Benjamin Otte <otte@gnome.org> | 2009-06-25 13:01:48 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2009-06-25 13:01:48 +0200 |
commit | c372064a04f8c24efdb99a3b0811bd17ddfb2176 (patch) | |
tree | 61906e539114b76be2d7c82c384688f50bada002 /client/gvfsdaemondbus.h | |
parent | 133bd0ec75a94b8316b56c252dfc62a3ed23fade (diff) | |
download | gvfs-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.h | 4 |
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__ */ |