[geary/wip/713150-conversations] Cleanup



commit 3617d85756629c582ae6f3f0cce9d3b1650f7c27
Author: Jim Nelson <jim yorba org>
Date:   Mon Mar 2 18:29:31 2015 -0800

    Cleanup

 .../app-conversation-operation-queue.vala          |   13 +++++++++++++
 .../app-conversation-operation.vala                |    2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/app/conversation-monitor/app-conversation-operation-queue.vala 
b/src/engine/app/conversation-monitor/app-conversation-operation-queue.vala
index 3b026a5..5d95ce1 100644
--- a/src/engine/app/conversation-monitor/app-conversation-operation-queue.vala
+++ b/src/engine/app/conversation-monitor/app-conversation-operation-queue.vala
@@ -4,8 +4,18 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
+/**
+ * The ConversationOperationQueue ensures that certain operations in the { link ConversationMonitor}
+ * are serialized and performed in order, preventing reentrancy and state oddities due to its
+ * asynchronous (blocking) nature.
+ *
+ * ConversationOperationQueue also understands the unique nature of the { link FillWindowOperation}
+ * and ensures only one is present in the queue at once.
+ */
+
 private class Geary.App.ConversationOperationQueue : BaseObject {
     public bool is_processing { get; private set; default = false; }
+    
     public Geary.SimpleProgressMonitor progress_monitor { get; private set; default = 
         new Geary.SimpleProgressMonitor(Geary.ProgressType.ACTIVITY); }
     
@@ -14,6 +24,9 @@ private class Geary.App.ConversationOperationQueue : BaseObject {
     private Geary.Nonblocking.Spinlock processing_done_spinlock
         = new Geary.Nonblocking.Spinlock();
     
+    public ConversationOperationQueue() {
+    }
+    
     public void clear() {
         mailbox.clear();
     }
diff --git a/src/engine/app/conversation-monitor/app-conversation-operation.vala 
b/src/engine/app/conversation-monitor/app-conversation-operation.vala
index 6d8bbf9..c880078 100644
--- a/src/engine/app/conversation-monitor/app-conversation-operation.vala
+++ b/src/engine/app/conversation-monitor/app-conversation-operation.vala
@@ -7,7 +7,7 @@
 private abstract class Geary.App.ConversationOperation : BaseObject {
     protected weak ConversationMonitor? monitor = null;
     
-    public ConversationOperation(ConversationMonitor? monitor) {
+    protected ConversationOperation(ConversationMonitor? monitor) {
         this.monitor = monitor;
     }
     


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]