diff -r 6d8a403eff0a -r 6650e0d50a1a SharedQueue.st --- a/SharedQueue.st Thu Mar 09 03:18:23 1995 +0100 +++ b/SharedQueue.st Sat Mar 18 06:08:34 1995 +0100 @@ -1,6 +1,6 @@ " COPYRIGHT (c) 1993 by Claus Gittinger - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -11,16 +11,16 @@ " Queue subclass:#SharedQueue - instanceVariableNames:'accessProtect dataAvailable spaceAvailable' - classVariableNames:'' - poolDictionaries:'' - category:'Collections-Ordered'! + instanceVariableNames:'accessProtect dataAvailable spaceAvailable' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Processes'! SharedQueue comment:' COPYRIGHT (c) 1993 by Claus Gittinger - All Rights Reserved + All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/SharedQueue.st,v 1.7 1994-08-05 01:02:31 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/SharedQueue.st,v 1.8 1995-03-18 05:08:21 claus Exp $ '! !SharedQueue class methodsFor:'documentation'! @@ -28,7 +28,7 @@ copyright " COPYRIGHT (c) 1993 by Claus Gittinger - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -41,7 +41,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/SharedQueue.st,v 1.7 1994-08-05 01:02:31 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/SharedQueue.st,v 1.8 1995-03-18 05:08:21 claus Exp $ " ! @@ -85,22 +85,22 @@ ok := false. [ok] whileFalse:[ - [tally == 0] whileTrue:[ - dataAvailable wait - ]. - accessProtect critical:[ - " - this check is needed, since another process may - have read the value in the meantime ... - " - tally == 0 ifFalse:[ - value := super next. - tally == (contentsArray size - 1) ifTrue:[ - spaceAvailable signal - ]. - ok := true - ] - ] + [tally == 0] whileTrue:[ + dataAvailable wait + ]. + accessProtect critical:[ + " + this check is needed, since another process may + have read the value in the meantime ... + " + tally == 0 ifFalse:[ + value := super next. + tally == (contentsArray size - 1) ifTrue:[ + spaceAvailable signal + ]. + ok := true + ] + ] ]. ^ value ! @@ -114,18 +114,18 @@ ok := false. [ok] whileFalse:[ - [tally == contentsArray size] whileTrue:[ - spaceAvailable wait - ]. - accessProtect critical:[ - tally == contentsArray size ifFalse:[ - super nextPut:anObject. - tally == 1 ifTrue:[ - dataAvailable signal - ]. - ok := true - ] - ] + [tally == contentsArray size] whileTrue:[ + spaceAvailable wait + ]. + accessProtect critical:[ + tally == contentsArray size ifFalse:[ + super nextPut:anObject. + tally == 1 ifTrue:[ + dataAvailable signal + ]. + ok := true + ] + ] ]. ^ anObject ! !