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

Unified Diff: sdk/lib/io/chunked_stream.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/async/timer.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/chunked_stream.dart
diff --git a/sdk/lib/io/chunked_stream.dart b/sdk/lib/io/chunked_stream.dart
index c74a057cb0570538f46abddb14509a684cf53e8f..07fd9b46858c0f485e56847f1ac620e6a0e638af 100644
--- a/sdk/lib/io/chunked_stream.dart
+++ b/sdk/lib/io/chunked_stream.dart
@@ -92,7 +92,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
void _checkScheduleCallback() {
// TODO(sgjesse): Find a better way of scheduling callbacks from
// the event loop.
- void issueDataCallback(Timer timer) {
+ void issueDataCallback() {
_scheduledDataCallback = null;
if (_clientDataHandler != null) {
_clientDataHandler();
@@ -100,7 +100,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
}
}
- void issueCloseCallback(Timer timer) {
+ void issueCloseCallback() {
_scheduledCloseCallback = null;
if (!_closed) {
if (_clientCloseHandler != null) _clientCloseHandler();
@@ -113,7 +113,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
(_bufferList.length > 0 && _inputClosed)) &&
_clientDataHandler != null &&
_scheduledDataCallback == null) {
- _scheduledDataCallback = new Timer(0, issueDataCallback);
+ _scheduledDataCallback = Timer.run(issueDataCallback);
}
// Schedule close callback if no more data and input is closed.
@@ -124,7 +124,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
if (_scheduledDataCallback != null) {
_scheduledDataCallback.cancel();
}
- _scheduledCloseCallback = new Timer(0, issueCloseCallback);
+ _scheduledCloseCallback = Timer.run(issueCloseCallback);
}
}
« no previous file with comments | « sdk/lib/async/timer.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698