[f-spot] Make sure F-Spot exists correctly.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Make sure F-Spot exists correctly.
- Date: Wed, 16 Jun 2010 19:17:50 +0000 (UTC)
commit b2fdf3449afaaae830d94985f9a8bbec235050ce
Author: Ruben Vermeersch <ruben savanne be>
Date: Wed Jun 16 21:17:22 2010 +0200
Make sure F-Spot exists correctly.
src/ImageLoaderThread.cs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/ImageLoaderThread.cs b/src/ImageLoaderThread.cs
index 29d61a6..626b19f 100644
--- a/src/ImageLoaderThread.cs
+++ b/src/ImageLoaderThread.cs
@@ -135,6 +135,9 @@ public class ImageLoaderThread {
{
should_cancel = true;
if (worker_thread != null) {
+ lock (queue) {
+ Monitor.Pulse (queue);
+ }
worker_thread.Join ();
}
worker_thread = null;
@@ -251,8 +254,11 @@ public class ImageLoaderThread {
lock (queue) {
- while (queue.Count == 0 || block_count > 0)
+ while ((queue.Count == 0 || block_count > 0) && !should_cancel)
Monitor.Wait (queue);
+
+ if (should_cancel)
+ return;
int pos = queue.Count - 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]