#TUNING by stefan
authorStefan Vogel <sv@exept.de>
Mon, 06 Feb 2017 15:40:39 +0100
changeset 21362 985836810acb
parent 21361 a63984f4eceb
child 21363 dbd8602f07b1
#TUNING by stefan class: ExternalStream removed: #canReadWithoutBlocking #canWriteWithoutBlocking -- moved to NonPositionableExternalStream
ExternalStream.st
--- a/ExternalStream.st	Mon Feb 06 15:40:11 2017 +0100
+++ b/ExternalStream.st	Mon Feb 06 15:40:39 2017 +0100
@@ -5638,41 +5638,6 @@
     "Modified: / 30.10.1998 / 20:16:06 / cg"
 !
 
-canReadWithoutBlocking
-    "return true, if any data is available for reading (i.e.
-     a read operation will not block the smalltalk process), false otherwise.
-     We know, that error conditions do not block, so return true for errors."
-
-    ^ readAhead notNil
-        or:[handle isNil
-        or:[mode == #writeonly
-        or:[OperatingSystem readCheck:self fileHandle]]]
-
-    "
-     |pipe|
-
-     pipe := PipeStream readingFrom:'(sleep 10; echo hello)'.
-     pipe canReadWithoutBlocking ifTrue:[
-         Transcript showCR:'data available'
-     ] ifFalse:[
-         Transcript showCR:'no data available'
-     ].
-     pipe close
-    "
-
-    "Modified: 25.9.1997 / 13:08:45 / stefan"
-!
-
-canWriteWithoutBlocking
-    "return true, if data can be written into the stream
-     (i.e. a write operation will not block the smalltalk process).
-     We know, that error conditions do not block, so return true for errors."
-
-    ^ handle isNil
-        or:[mode == #readonly
-        or:[OperatingSystem writeCheck:self fileHandle]]
-!
-
 gotErrorOrEOF
     "answer true, if amn error or eof has been occurred on the stream"