[geary/geary-0.8] Geary window does not open due to race condition: Bug #737811
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.8] Geary window does not open due to race condition: Bug #737811
- Date: Sat, 20 Dec 2014 01:04:19 +0000 (UTC)
commit 940df9ae44a9040068567e438c3fe7b8459cc2c4
Author: Mark Pariente <markpariente gmail com>
Date: Tue Dec 2 14:14:52 2014 -0800
Geary window does not open due to race condition: Bug #737811
Although prior fix for bug #737811 solved problem for some users,
apparently Geary still had an issue when upgrading a database with
new GLib Mutex implementation, which uses Linux's futexes whenever
available. This solution gives the notifying thread a chance to
signal the waiter that its work is completed.
THANKS | 1 +
src/engine/util/util-synchronization.vala | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/THANKS b/THANKS
index 0535b45..694368f 100644
--- a/THANKS
+++ b/THANKS
@@ -32,6 +32,7 @@ Tom Most <twm freecog net>
Philipp Nordhus <philipp nhus de>
Andreas Obergrusberger <tradiaz yahoo de>
Martin Olsson <martin minimum se>
+Mark Pariente <markpariente gmail com>
Robert Park <rbpark exolucere ca>
Mario Sanchez Prada <msanchez igalia com>
Tiago Quelhas <tiagoq gmail com>
diff --git a/src/engine/util/util-synchronization.vala b/src/engine/util/util-synchronization.vala
index 9416d12..36e6ba7 100644
--- a/src/engine/util/util-synchronization.vala
+++ b/src/engine/util/util-synchronization.vala
@@ -64,10 +64,14 @@ public class SpinWaiter : BaseObject {
int64 end_time = get_monotonic_time() + (actual_poll_msec * TimeSpan.MILLISECOND);
if (!cond.wait_until(mutex, end_time)) {
// timeout passed, allow the callback to run
+ mutex.unlock();
if (!cb()) {
// PollService returned false, abort
+ mutex.lock();
+
break;
}
+ mutex.lock();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]