[tracker/needle: 38/41] tracker-needle: Use cursor.next_async() to give Spinner some cpu time
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/needle: 38/41] tracker-needle: Use cursor.next_async() to give Spinner some cpu time
- Date: Mon, 20 Sep 2010 22:16:34 +0000 (UTC)
commit 35fe541dc0f054210b7d433c7edebe09c87b3b4e
Author: Martyn Russell <martyn lanedo com>
Date: Fri Sep 10 11:30:26 2010 +0100
tracker-needle: Use cursor.next_async() to give Spinner some cpu time
This currently causes a crash, this has been committed to allow testing
against the issues which resides in libtracker-fts due to libtracker-fts
expecting a single threaded use
src/tracker-needle/tracker-needle.vala | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index e17ac93..8868a11 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -276,10 +276,13 @@ public class TrackerNeedle {
var screen = window.get_screen ();
var theme = IconTheme.get_for_screen (screen);
- while (cursor.next ()) {
- int i;
+ while (true) {
+ bool b = yield cursor.next_async ();
+ if (!b) {
+ break;
+ }
- for (i = 0; i < cursor.n_columns; i++) {
+ for (int i = 0; i < cursor.n_columns; i++) {
if (i == 0) {
debug ("--> %s", cursor.get_string (i));
} else {
@@ -354,10 +357,13 @@ public class TrackerNeedle {
return;
}
- while (cursor.next ()) {
- int i;
+ while (true) {
+ bool b = yield cursor.next_async ();
+ if (!b) {
+ break;
+ }
- for (i = 0; i < cursor.n_columns; i++) {
+ for (int i = 0; i < cursor.n_columns; i++) {
if (i == 0) {
debug ("--> %s", cursor.get_string (i));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]