We decided to revert the
breaking change announced earlier for Dart 1.9 that made dart:io
stdout and
stderr non-blocking.
As of change
r42953 the dart:io objects
stdout and
stderr are again blocking. This reverts change
r41436 that made dart:io
stdout and
stderr objects non-blocking, and brings back the synchronous, aka. blocking, behavior introduced in Dart 1.3. This makes it easier for command-line applications to write messages to the console.
As part of this change the Console class has also been removed.
Why revert back?
In the end we decided that the convenience of having stdout and stderr be blocking outweighed the inconsistency of this part the API not following the non-blocking behavior of dart:io.
However, to accommodate applications using piping through stdin/stdout as a general bi-directional communication channel, we added the getter nonBlocking to stdout and stderr. This getter returns a non-blocking IOSink.
Regards,
Søren Gjesse
---
Søren Gjesse
Software Engineer, Google Denmark
CVR nr. 28 86 69 84