FIX: cannot readWait before processor is initialized
authorClaus Gittinger <cg@exept.de>
Sun, 24 May 2015 14:51:37 +0200
changeset 18398 d08f2a7c9601
parent 18396 b42870402e9b
child 18399 5a3372cd04de
FIX: cannot readWait before processor is initialized
NonPositionableExternalStream.st
--- a/NonPositionableExternalStream.st	Sat May 23 17:00:25 2015 +0200
+++ b/NonPositionableExternalStream.st	Sun May 24 14:51:37 2015 +0200
@@ -498,6 +498,18 @@
 
 !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.
@@ -595,10 +607,10 @@
 !NonPositionableExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.74 2015-05-03 12:39:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.75 2015-05-24 12:51:37 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.74 2015-05-03 12:39:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.75 2015-05-24 12:51:37 cg Exp $'
 ! !