diff dwtx/jface/text/reconciler/DirtyRegionQueue.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents f70d9508c95c
children
line wrap: on
line diff
--- a/dwtx/jface/text/reconciler/DirtyRegionQueue.d	Wed Aug 27 14:49:30 2008 +0200
+++ b/dwtx/jface/text/reconciler/DirtyRegionQueue.d	Mon Sep 08 00:51:37 2008 +0200
@@ -30,7 +30,8 @@
 
 import dwtx.dwtxhelper.Collection;
 
-
+import tango.core.sync.Mutex;
+import tango.core.sync.Condition;
 
 /**
  * Queue used by {@link dwtx.jface.text.reconciler.AbstractReconciler} to manage
@@ -40,16 +41,28 @@
  * @see dwtx.jface.text.reconciler.AbstractReconciler
  * @see dwtx.jface.text.reconciler.DirtyRegion
  */
-class DirtyRegionQueue {
+class DirtyRegionQueue : Mutex {
 
     /** The list of dirty regions. */
-    private List fDirtyRegions= new ArrayList();
-
+    private List fDirtyRegions;
+    private Condition cond;
     /**
      * Creates a new empty dirty region.
      */
     public this() {
-        super();
+        //super();
+        fDirtyRegions= new ArrayList();
+        cond = new Condition(this);
+    }
+
+    public void wait(){
+        cond.wait();
+    }
+    public void wait(int delay){
+        cond.wait(delay/1000.0);
+    }
+    public void notifyAll(){
+        cond.notifyAll();
     }
 
     /**