[geary] 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 window does not open due to race condition: Bug #737811
- Date: Tue, 2 Dec 2014 22:19:14 +0000 (UTC)
commit b22682d2a292796e96029b8d21e0a3977c381a59
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 ae0dc02..adf85f0 100644
--- a/THANKS
+++ b/THANKS
@@ -34,6 +34,7 @@ Georges Basile Stavracas Neto <georges stavracas gmail com>
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]