#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Mon, 18 Nov 2019 17:43:09 +0100
changeset 5248 c7c5f1e03294
parent 5247 abb5d984aafa
child 5249 08af43aaea4c
#DOCUMENTATION by cg class: SharedQueue category of: #next
SharedQueue.st
--- a/SharedQueue.st	Mon Nov 18 16:19:41 2019 +0100
+++ b/SharedQueue.st	Mon Nov 18 17:43:09 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -293,27 +291,6 @@
 
 !SharedQueue methodsFor:'accessing-reading'!
 
-next
-    "return the next value in the queue; if it its empty, wait 'til
-     something is put into the receiver.
-     When the datum has been removed, signal space-availability to writers"
-
-    |retVal|
-
-    "/ need a loop here, in case someone else was reading the element in-between the
-    "/ wait and the accessLock-critical
-    [
-        dataAvailable wait.
-        retVal := accessLock critical:[super nextOrNil].
-    ] doWhile:[retVal isNil].
-    spaceAvailable signal.
-
-    ^ retVal.
-
-    "Modified: / 22-02-2017 / 14:40:32 / stefan"
-    "Modified (comment): / 25-06-2019 / 14:28:44 / Claus Gittinger"
-!
-
 nextIfEmpty:exceptionBlock
     "return the next value in the queue; 
      if it is empty do not wait, but return the value of exceptionBlock.
@@ -457,6 +434,29 @@
     "Modified (comment): / 22-02-2017 / 15:18:03 / stefan"
 ! !
 
+!SharedQueue methodsFor:'reading'!
+
+next
+    "return the next value in the queue; if it its empty, wait 'til
+     something is put into the receiver.
+     When the datum has been removed, signal space-availability to writers"
+
+    |retVal|
+
+    "/ need a loop here, in case someone else was reading the element in-between the
+    "/ wait and the accessLock-critical
+    [
+        dataAvailable wait.
+        retVal := accessLock critical:[super nextOrNil].
+    ] doWhile:[retVal isNil].
+    spaceAvailable signal.
+
+    ^ retVal.
+
+    "Modified: / 22-02-2017 / 14:40:32 / stefan"
+    "Modified (comment): / 25-06-2019 / 14:28:44 / Claus Gittinger"
+! !
+
 !SharedQueue class methodsFor:'documentation'!
 
 version