NonPositionableExternalStream.st
branchjv
changeset 18800 02724cc719b6
parent 18403 9a3fc7cc7127
parent 18798 0b4860a5c695
child 19103 71257a47eba2
--- a/NonPositionableExternalStream.st	Thu Oct 01 06:52:24 2015 +0200
+++ b/NonPositionableExternalStream.st	Fri Oct 02 06:42:49 2015 +0100
@@ -460,15 +460,15 @@
     "return true, if position is at end"
 
     (self == StdInStream) ifTrue:[
-	OperatingSystem hasConsole ifFalse:[
-	    ^ true
-	]
+        OperatingSystem hasConsole ifFalse:[
+            ^ true
+        ]
     ].
 
     "first, wait to avoid blocking on the read.
      On end of stream or error, readWait will return"
 
-    self readWait.
+    self readWaitWithTimeoutMs:nil.
     ^ super atEnd.
 !
 
@@ -498,18 +498,6 @@
 
 !NonPositionableExternalStream methodsFor:'reading'!
 
-readWait
-    "cannot do a readWait (which means possible suspend),
-     if the processor is not yet initialized; i.e. if a read is attempted
-     during early startup.
-     This may happen, for example, if a MiniDebugger is entered, before
-     process scheduling has been setup.
-     In this case, all I/O operations here will be blocking."
-
-    Smalltalk isInitialized ifFalse:[ ^ false ].
-    ^ super readWait
-!
-
 next
     "return the next element, if available.
      If nothing is available, this does never raise a read-beyond end signal.
@@ -517,14 +505,14 @@
 
      Redefined, to wait on pipes and sockets"
 
-    self readWait.
+    self readWaitWithTimeoutMs:nil.
     ^ super next
 !
 
 nextLine
     "Redefined, to wait on pipes and sockets"
 
-    self readWait.
+    self readWaitWithTimeoutMs:nil.
     ^ super nextLine
 !
 
@@ -542,7 +530,7 @@
 peek
     "Redefined, to wait on pipes and sockets"
 
-    self readWait.
+    self readWaitWithTimeoutMs:nil.
     ^ super peek
 !
 
@@ -555,6 +543,18 @@
 
     self atEnd ifTrue:[^ nil].
     ^ self peek
+!
+
+readWaitWithTimeoutMs:millisecondsOrNil
+    "cannot do a readWait (which means possible suspend),
+     if the processor is not yet initialized; i.e. if a read is attempted
+     during early startup.
+     This may happen, for example, if a MiniDebugger is entered, before
+     process scheduling has been setup.
+     In this case, all I/O operations here will be blocking."
+
+    Smalltalk isInitialized ifFalse:[ ^ false ].
+    ^ super readWaitWithTimeoutMs:millisecondsOrNil
 ! !
 
 !NonPositionableExternalStream methodsFor:'writing'!
@@ -607,10 +607,10 @@
 !NonPositionableExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.75 2015-05-24 12:51:37 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.75 2015-05-24 12:51:37 cg Exp $'
+    ^ '$Header$'
 ! !