[tracker/dont-interrupt-create-statement] comment
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [tracker/dont-interrupt-create-statement] comment
- Date: Mon, 24 May 2010 14:21:37 +0000 (UTC)
commit 37451e906648e2ebaf728e4ce25e37ff74f17d7f
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon May 24 16:20:22 2010 +0200
    comment
 src/libtracker-db/tracker-db-interface-sqlite.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-interface-sqlite.c b/src/libtracker-db/tracker-db-interface-sqlite.c
index 61ee78f..4e32eb4 100644
--- a/src/libtracker-db/tracker-db-interface-sqlite.c
+++ b/src/libtracker-db/tracker-db-interface-sqlite.c
@@ -808,6 +808,10 @@ tracker_db_interface_sqlite_create_statement (TrackerDBInterface *db_interface,
 
 		g_static_rec_mutex_lock (&priv->interrupt_mutex);
 
+		/* This sqlite3_prepare_v2 is why priv->interrupt_mutex is a 'recursive'
+		 * lock; sqlite3_prepare_v2 will also cause calls to check_interrupt
+		 * from this thread, and otherwise we'd be locked already right here. */
+
 		if (sqlite3_prepare_v2 (priv->db, query, -1, &sqlite_stmt, NULL) != SQLITE_OK) {
 			g_critical ("Unable to prepare query '%s': %s", query, sqlite3_errmsg (priv->db));
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]