ExternalStream.st
branchjv
changeset 18334 3e18bee23c3a
parent 18315 e678ab267382
parent 18327 57a095b55d92
child 18366 a6e62e167c32
--- a/ExternalStream.st	Wed May 06 06:59:44 2015 +0200
+++ b/ExternalStream.st	Sun May 10 07:10:08 2015 +0100
@@ -5452,7 +5452,7 @@
     ^ OperatingSystem supportsSelect
 !
 
-readWaitWithTimeoutMs:timeout
+readWaitWithTimeoutMs:timeoutOrNil
     "suspend the current process, until the receiver
      becomes ready for reading or a timeout (in milliseconds) expired.
      If data is already available, return immediate.
@@ -5472,19 +5472,19 @@
     wasBlocked := OperatingSystem blockInterrupts.
     inputSema := Semaphore new name:'readWait'.
     [
-	timeout notNil ifTrue:[
-	    Processor signal:inputSema afterMilliseconds:timeout.
-	].
-	Processor signal:inputSema onInput:fd.
-	Processor activeProcess state:#ioWait.
-	inputSema wait.
-	hasTimedout := timeout notNil and:[(OperatingSystem readCheck:fd) not].
+        timeoutOrNil notNil ifTrue:[
+            Processor signal:inputSema afterMilliseconds:timeoutOrNil.
+        ].
+        Processor signal:inputSema onInput:fd.
+        Processor activeProcess state:#ioWait.
+        inputSema wait.
+        hasTimedout := timeoutOrNil notNil and:[(OperatingSystem readCheck:fd) not].
     ] ifCurtailed:[
-	Processor disableSemaphore:inputSema.
-	wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+        Processor disableSemaphore:inputSema.
+        wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ].
-    timeout notNil ifTrue:[
-	Processor disableSemaphore:inputSema.
+    timeoutOrNil notNil ifTrue:[
+        Processor disableSemaphore:inputSema.
     ].
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
     ^ hasTimedout
@@ -6485,11 +6485,11 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.417 2015-05-03 12:38:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.418 2015-05-08 01:06:30 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.417 2015-05-03 12:38:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.418 2015-05-08 01:06:30 cg Exp $'
 ! !