class: SemaphoreSet
authorStefan Vogel <sv@exept.de>
Fri, 28 Mar 2014 14:39:55 +0100
changeset 16287 b989ab286181
parent 16286 4fd3aa76f29e
child 16288 c599c7f52198
class: SemaphoreSet changed: #wait #waitWithTimeoutMs: use "[] whileTrue" instead of "[] doUntil:[]" - for better optimization
SemaphoreSet.st
--- a/SemaphoreSet.st	Fri Mar 28 14:39:32 2014 +0100
+++ b/SemaphoreSet.st	Fri Mar 28 14:39:55 2014 +0100
@@ -193,7 +193,9 @@
                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
             ].
         ].
-    ] doWhile:[gotSema isNil].
+
+        gotSema isNil
+    ] whileTrue.
 
     "
       we finally got at least one of our semaphores.
@@ -283,7 +285,9 @@
                 wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
             ].
         ].
-    ] doUntil:[gotSema notNil or:[timeoutOccured]].
+
+        gotSema isNil and:[timeoutOccured not]
+    ] whileTrue.
 
     timeoutBlock notNil ifTrue:[
         Processor removeTimedBlock:timeoutBlock.
@@ -310,10 +314,10 @@
 !SemaphoreSet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SemaphoreSet.st,v 1.20 2013-02-08 16:08:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SemaphoreSet.st,v 1.21 2014-03-28 13:39:55 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/SemaphoreSet.st,v 1.20 2013-02-08 16:08:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SemaphoreSet.st,v 1.21 2014-03-28 13:39:55 stefan Exp $'
 ! !