Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: sdk/lib/io/stream_util.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/socket_stream_impl.dart ('k') | sdk/lib/io/string_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/stream_util.dart
diff --git a/sdk/lib/io/stream_util.dart b/sdk/lib/io/stream_util.dart
index 1f782cc1a986cb1b50258a309356e7a7ff8f9080..b68b8fd7c295af1ce3d9794da574177875a272b0 100644
--- a/sdk/lib/io/stream_util.dart
+++ b/sdk/lib/io/stream_util.dart
@@ -99,7 +99,7 @@ abstract class _BaseDataInputStream {
}
void _checkScheduleCallbacks() {
- void issueDataCallback(Timer timer) {
+ void issueDataCallback() {
_scheduledDataCallback = null;
if (_clientDataHandler != null) {
_clientDataHandler();
@@ -107,7 +107,7 @@ abstract class _BaseDataInputStream {
}
}
- void issueCloseCallback(Timer timer) {
+ void issueCloseCallback() {
_scheduledCloseCallback = null;
_closeCallbackCalled = true;
if (_clientCloseHandler != null) _clientCloseHandler();
@@ -119,12 +119,12 @@ abstract class _BaseDataInputStream {
if (!_closeCallbackCalled) {
if (available() > 0) {
if (_scheduledDataCallback == null) {
- _scheduledDataCallback = new Timer(0, issueDataCallback);
+ _scheduledDataCallback = Timer.run(issueDataCallback);
}
} else if (_streamMarkedClosed && _scheduledCloseCallback == null) {
_cancelScheduledDataCallback();
_close();
- _scheduledCloseCallback = new Timer(0, issueCloseCallback);
+ _scheduledCloseCallback = Timer.run(issueCloseCallback);
}
}
}
« no previous file with comments | « sdk/lib/io/socket_stream_impl.dart ('k') | sdk/lib/io/string_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698