[tracker] tracker-store: Fixed deprecated ThreadPool API use for ThreadPool.with_owned_data
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-store: Fixed deprecated ThreadPool API use for ThreadPool.with_owned_data
- Date: Thu, 11 Dec 2014 16:00:28 +0000 (UTC)
commit 8dfb64062fad2f88119e3cf0ab53354b0c9c0677
Author: Martyn Russell <martyn lanedo com>
Date: Thu Dec 11 15:46:24 2014 +0000
tracker-store: Fixed deprecated ThreadPool API use for ThreadPool.with_owned_data
src/tracker-store/tracker-store.vala | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-store/tracker-store.vala b/src/tracker-store/tracker-store.vala
index be4d94d..0887c7f 100644
--- a/src/tracker-store/tracker-store.vala
+++ b/src/tracker-store/tracker-store.vala
@@ -112,7 +112,7 @@ public class Tracker.Store {
n_queries_running++;
try {
- query_pool.push (task);
+ query_pool.add (task);
} catch (Error e) {
// ignore harmless thread creation error
}
@@ -128,7 +128,7 @@ public class Tracker.Store {
if (task != null) {
update_running = true;
try {
- update_pool.push (task);
+ update_pool.add (task);
} catch (Error e) {
// ignore harmless thread creation error
}
@@ -205,7 +205,7 @@ public class Tracker.Store {
return false;
}
- static void pool_dispatch_cb (Task task) {
+ static void pool_dispatch_cb (owned Task task) {
try {
if (task.type == TaskType.QUERY) {
var query_task = (QueryTask) task;
@@ -306,9 +306,9 @@ public class Tracker.Store {
}
try {
- update_pool = new ThreadPool<Task> (pool_dispatch_cb, 1, true);
- query_pool = new ThreadPool<Task> (pool_dispatch_cb, MAX_CONCURRENT_QUERIES, true);
- checkpoint_pool = new ThreadPool<bool> (checkpoint_dispatch_cb, 1, true);
+ update_pool = new ThreadPool<Task>.with_owned_data (pool_dispatch_cb, 1, true);
+ query_pool = new ThreadPool<Task>.with_owned_data (pool_dispatch_cb,
MAX_CONCURRENT_QUERIES, true);
+ checkpoint_pool = new ThreadPool<bool>.with_owned_data (checkpoint_dispatch_cb, 1,
true);
} catch (Error e) {
warning (e.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]