'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 11 February 2006 at 3:19:23 pm'! "Change Set: fixSharedQ2-bf Date: 11 February 2006 Author: Bert Freudenberg Nil out unused slots in shared queue. This is a really old fix of mine, wonder what else we are missing ..."! !SharedQueue methodsFor: 'accessing' stamp: 'bf 2/11/2006 15:17'! flush "Throw out all pending contents" accessProtect critical: [ "nil out flushed slots --bf 02/11/2006" contentsArray from: readPosition to: writePosition-1 put: nil. readPosition _ 1. writePosition _ 1. "Reset the read synchronization semaphore" readSynch initSignals].! ! !SharedQueue methodsFor: 'private' stamp: 'bf 10/25/2005 15:33'! makeRoomAtEnd | contentsSize | readPosition = 1 ifTrue: [contentsArray _ contentsArray , (Array new: 10)] ifFalse: [contentsSize _ writePosition - readPosition. "BLT direction ok for this. Lots faster!!!!!!!!!!!! SqR!!!! 4/10/2000 10:47" contentsArray replaceFrom: 1 to: contentsSize with: contentsArray startingAt: readPosition. "nil out remainder --bf 10/25/2005" contentsArray from: contentsSize+1 to: contentsArray size put: nil. readPosition _ 1. writePosition _ contentsSize + 1]! !