--- 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