--- a/Semaphore.st Thu Feb 02 13:23:05 1995 +0100
+++ b/Semaphore.st Thu Feb 02 13:25:49 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.13 1994-10-28 01:29:18 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.14 1995-02-02 12:25:49 claus Exp $
'!
!Semaphore class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.13 1994-10-28 01:29:18 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.14 1995-02-02 12:25:49 claus Exp $
"
!
@@ -95,6 +95,15 @@
count := n
! !
+!Semaphore methodsFor:'queries '!
+
+wouldBlock
+ "return true, if the receiver would block the activeProcess
+ if a wait was performed. False otherwise."
+
+ ^ count == 0
+! !
+
!Semaphore methodsFor:'wait & signal'!
wait