--- a/SharedQueue.st Wed Sep 07 15:25:13 2016 +0200
+++ b/SharedQueue.st Wed Sep 07 15:26:24 2016 +0200
@@ -178,9 +178,9 @@
!
nextPut:anObject
- "enter anObject into the queue; wait for available space, if
- the queue is full. After the put, signal availablity of a datum
- to readers."
+ "enter anObject to the end of the queue;
+ wait for available space, if the queue is full.
+ After the put, signal availablity of a datum to readers."
|retVal|
@@ -193,6 +193,11 @@
!
nextPutFirst:anObject
+ "insert anObject at the beginning of the queue;
+ wait for available space, if the queue is full.
+ After the put, signal availablity of a datum to readers.
+ Insertion at the beginning may be useful to add hi-prio elements (for example, in a job-scheduler)"
+
|retVal|
spaceAvailable wait.
@@ -278,6 +283,18 @@
spaceAvailable signal.
^ retVal.
+!
+
+superNextPut:anObject
+ "private; to allow subclasses to call the basic nextPut (w.o. synchronization)"
+
+ ^ super nextPut:anObject.
+!
+
+superNextPutFirst:anObject
+ "private; to allow subclasses to call the basic nextPutFirst (w.o. synchronization)"
+
+ ^ super nextPutFirst:anObject.
! !
!SharedQueue methodsFor:'accessing-internals'!