[tracker] libtracker-direct: Drop mutex around TrackerDBManager initialization
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-direct: Drop mutex around TrackerDBManager initialization
- Date: Sun, 20 Nov 2016 16:07:36 +0000 (UTC)
commit 8504378d1b042888343e69683a4f5425d14b95fe
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 5 19:52:10 2016 +0100
libtracker-direct: Drop mutex around TrackerDBManager initialization
It doesn't need to care about this anymore, TrackerDBManager uses an
internal mutex.
src/libtracker-direct/tracker-direct.vala | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/libtracker-direct/tracker-direct.vala b/src/libtracker-direct/tracker-direct.vala
index 00440cc..a4f0d87 100644
--- a/src/libtracker-direct/tracker-direct.vala
+++ b/src/libtracker-direct/tracker-direct.vala
@@ -22,8 +22,6 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
bool initialized;
public Connection () throws Sparql.Error, IOError, DBusError {
- DBManager.lock ();
-
try {
if (use_count == 0) {
// make sure that current locale vs db locale are the same,
@@ -45,8 +43,6 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
initialized = true;
} catch (Error e) {
throw new Sparql.Error.INTERNAL (e.message);
- } finally {
- DBManager.unlock ();
}
}
@@ -57,16 +53,10 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
}
// Clean up connection
- DBManager.lock ();
+ use_count--;
- try {
- use_count--;
-
- if (use_count == 0) {
- Data.Manager.shutdown ();
- }
- } finally {
- DBManager.unlock ();
+ if (use_count == 0) {
+ Data.Manager.shutdown ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]