[dart-announce] CHANGE: dart:io objects stdout and stderr are now blocking

40 views
Skip to first unread message

Søren Gjesse

unread,
Jan 22, 2015, 9:37:16 AM1/22/15
to anno...@dartlang.org
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

--
For more news and information, visit https://plus.google.com/+dartlang
 
To join the conversation, visit https://groups.google.com/a/dartlang.org/
Reply all
Reply to author
Forward
0 new messages