#OTHER by exept
authorClaus Gittinger <cg@exept.de>
Mon, 26 Aug 2019 23:13:06 +0200
changeset 5162 5e8ae4c499d4
parent 5161 a6ed595625e9
child 5163 bb5f55706bab
#OTHER by exept changed: #nextPut: returns its argument
CollectingSharedQueueStream.st
--- a/CollectingSharedQueueStream.st	Mon Aug 26 23:12:40 2019 +0200
+++ b/CollectingSharedQueueStream.st	Mon Aug 26 23:13:06 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1997 by Claus Gittinger
               All Rights Reserved
@@ -187,9 +189,8 @@
 !
 
 nextPut:anObject
-    "append anObject to the queue; if anyone is waiting, tell him"
-
-    |value|
+    "append anObject to the queue; if anyone is waiting, tell him.
+     Answer anObject"
 
     contents add:anObject.
     writePosition := writePosition + 1.
@@ -199,7 +200,8 @@
             self changed:#size with:nil
         ]
     ].
-    dataAvailable signal
+    dataAvailable signal.
+    ^ anObject
 
     "Created: 5.3.1997 / 14:33:44 / cg"
     "Modified: 5.3.1997 / 15:42:33 / cg"