mutual exclusion when updating contents
authorclaus
Wed, 24 Aug 1994 01:39:16 +0200
changeset 52 e69fade0aa8e
parent 51 e895ac4cc7c8
child 53 b587b15eafab
mutual exclusion when updating contents
TextColl.st
TextCollector.st
--- a/TextColl.st	Wed Aug 24 01:38:59 1994 +0200
+++ b/TextColl.st	Wed Aug 24 01:39:16 1994 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.8 1994-08-07 13:18:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.9 1994-08-23 23:39:16 claus Exp $
 '!
 
 !TextCollector class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.8 1994-08-07 13:18:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.9 1994-08-23 23:39:16 claus Exp $
 "
 !
 
@@ -189,8 +189,8 @@
     Processor removeTimedBlock:flushBlock.
     flushPending := false.
 
-    outstandingLines size ~~ 0 ifTrue:[
-        access critical:[
+    access critical:[
+        outstandingLines size ~~ 0 ifTrue:[
             "insert the bunch of lines - if any"
             lines := outstandingLines.
             outstandingLines := OrderedCollection new.
@@ -204,13 +204,13 @@
                     ]
                 ].
             ].
-            "and the last partial line - if any"
-            outstandingLine notNil ifTrue:[
-                self insertStringAtCursor:outstandingLine.
-                outstandingLine := ''.
-            ].
-            self checkLineLimit
-        ]
+        ].
+        "and the last partial line - if any"
+        outstandingLine notNil ifTrue:[
+            self insertStringAtCursor:outstandingLine.
+            outstandingLine := ''.
+        ].
+        self checkLineLimit
     ]
 ! !
 
@@ -249,8 +249,9 @@
     flushPending ifFalse:[
         flushPending := true.
         "
-         this could run under a process, which dies in the meantime;
-         therefore, we have to interrupt the transcript process.
+         we could run under a process, which dies in the meantime;
+         therefore, we have to arrange for the transcript process to
+         be interrupted and do the update.
         "
         wg := self windowGroup.
         wg isNil ifTrue:[
--- a/TextCollector.st	Wed Aug 24 01:38:59 1994 +0200
+++ b/TextCollector.st	Wed Aug 24 01:39:16 1994 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.8 1994-08-07 13:18:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.9 1994-08-23 23:39:16 claus Exp $
 '!
 
 !TextCollector class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.8 1994-08-07 13:18:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.9 1994-08-23 23:39:16 claus Exp $
 "
 !
 
@@ -189,8 +189,8 @@
     Processor removeTimedBlock:flushBlock.
     flushPending := false.
 
-    outstandingLines size ~~ 0 ifTrue:[
-        access critical:[
+    access critical:[
+        outstandingLines size ~~ 0 ifTrue:[
             "insert the bunch of lines - if any"
             lines := outstandingLines.
             outstandingLines := OrderedCollection new.
@@ -204,13 +204,13 @@
                     ]
                 ].
             ].
-            "and the last partial line - if any"
-            outstandingLine notNil ifTrue:[
-                self insertStringAtCursor:outstandingLine.
-                outstandingLine := ''.
-            ].
-            self checkLineLimit
-        ]
+        ].
+        "and the last partial line - if any"
+        outstandingLine notNil ifTrue:[
+            self insertStringAtCursor:outstandingLine.
+            outstandingLine := ''.
+        ].
+        self checkLineLimit
     ]
 ! !
 
@@ -249,8 +249,9 @@
     flushPending ifFalse:[
         flushPending := true.
         "
-         this could run under a process, which dies in the meantime;
-         therefore, we have to interrupt the transcript process.
+         we could run under a process, which dies in the meantime;
+         therefore, we have to arrange for the transcript process to
+         be interrupted and do the update.
         "
         wg := self windowGroup.
         wg isNil ifTrue:[