[tracker] tracker-miner-fs: Explain why we don't close the sparql object on cancellation



commit 3d07aecedb36b31ef1493149f2fb6b59c2987e21
Author: Martyn Russell <martyn lanedo com>
Date:   Thu May 5 10:17:39 2011 +0100

    tracker-miner-fs: Explain why we don't close the sparql object on cancellation

 src/miners/fs/tracker-miner-files.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index d465ee2..f0fd235 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2051,9 +2051,15 @@ extractor_get_embedded_metadata_cancel (GCancellable    *cancellable,
 	GError *error;
 
 	/* TODO: Cancel extractor call
-	 * Isn't this as simple as g_cancellable_cancel (cancellable) now after the
-	 * GDBus port? The original dbus-glib code didn't have this so I have not
-	 * yet implemented it as part of the GDBus port. */
+	 * We should cancel all of these on finalize()
+	 *
+	 * NOTE: We currently don't call g_cancellable_cancel() so
+	 * this is here just in the event that we may at some point.
+	 * It's likely the only time this would happen is during
+	 * finalize(). This is also why we don't close the (what
+	 * should be) currently open sparql builder like we do on
+	 * error in extractor_skip_embedded_metadata_cb().
+	 */
 
 	error = g_error_new_literal (miner_files_error_quark, 0,
 	                             "Embedded metadata extraction was cancelled");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]