#BUGFIX by stefan
class: AbstractOperatingSystem class
changed:
#readWriteCheck: (send #~~ instead of #>)
#selectOn:and:withTimeOut: (send #~~ instead of #>)
#selectOn:withTimeOut: (send #~~ instead of #>)
select must return true on error (read or write will return!)
--- a/AbstractOperatingSystem.st Wed May 02 17:27:59 2018 +0200
+++ b/AbstractOperatingSystem.st Thu May 03 15:11:59 2018 +0200
@@ -7398,21 +7398,23 @@
|result fdArray|
self supportsSelect ifFalse:[
- "/ mhmh - what should we do then ?
- "/ For now, return true as if data was present,
- "/ and let the thread fall into the write.
- "/ It will then (hopefully) be desceduled there and
- "/ effectively polling for output.
- ^ true
+ "/ mhmh - what should we do then ?
+ "/ For now, return true as if data was present,
+ "/ and let the thread fall into the write.
+ "/ It will then (hopefully) be desceduled there and
+ "/ effectively polling for output.
+ ^ true
].
result := self
- selectOnAnyReadable:(fdArray := Array with:fd) writable:fdArray exception:nil
- readableInto:nil writableInto:nil exceptionInto:nil
- withTimeOut:0.
+ selectOnAnyReadable:(fdArray := Array with:fd) writable:fdArray exception:nil
+ readableInto:nil writableInto:nil exceptionInto:nil
+ withTimeOut:0.
"on select error, a read will immediately return, so answer true"
- ^ result > 0.
+ ^ result ~~ 0.
+
+ "Modified: / 03-05-2018 / 14:29:40 / stefan"
!
selectOn:fd1 and:fd2 withTimeOut:millis
@@ -7420,15 +7422,17 @@
A zero timeout-time will immediately return (i.e. poll).
Return fd if i/o ok, nil if timed-out or interrupted.
Obsolete:
- This is a leftover method and will vanish."
+ This is a leftover method and will vanish."
<resource: #obsolete>
|fdArray|
^ (self
- selectOnAnyReadable:(fdArray := Array with:fd1 with:fd2) writable:fdArray exception:nil
- readableInto:nil writableInto:nil exceptionInto:nil
- withTimeOut:millis) > 0.
+ selectOnAnyReadable:(fdArray := Array with:fd1 with:fd2) writable:fdArray exception:nil
+ readableInto:nil writableInto:nil exceptionInto:nil
+ withTimeOut:millis) ~~ 0.
+
+ "Modified: / 03-05-2018 / 14:30:03 / stefan"
!
selectOn:fd withTimeOut:millis
@@ -7441,9 +7445,11 @@
|fdArray|
^ (self
- selectOnAnyReadable:(fdArray := Array with:fd) writable:fdArray exception:nil
- readableInto:nil writableInto:nil exceptionInto:nil
- withTimeOut:millis) > 0.
+ selectOnAnyReadable:(fdArray := Array with:fd) writable:fdArray exception:nil
+ readableInto:nil writableInto:nil exceptionInto:nil
+ withTimeOut:millis) ~~ 0.
+
+ "Modified: / 03-05-2018 / 14:30:20 / stefan"
!
selectOnAny:fdArray withTimeOut:millis