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



commit fccd0fb2da9a58b0e3cf14a1e0065c81815312c7
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 33b0436..4a5db89 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2041,9 +2041,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]