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

Unified Diff: sdk/lib/async/stream_impl.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/future_impl.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_impl.dart
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index caa6318f858c0f99bba21171566e28340c6f4e0d..af68d43ea1a2376f3083d0997d6a4742678c2fbe 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -1026,7 +1026,7 @@ abstract class _PendingEvents {
void schedule(_StreamImpl stream) {
if (isScheduled) return;
- scheduleTimer = new Timer(0, (_) {
+ scheduleTimer = Timer.run(() {
scheduleTimer = null;
stream._handlePendingEvents();
});
@@ -1084,7 +1084,7 @@ class _DoneSubscription<T> implements StreamSubscription<T> {
void _delayDone() {
assert(_timer == null && _pauseCount == 0);
- _timer = new Timer(0, (_) {
+ _timer = Timer.run(() {
if (_handler != null) _handler();
});
}
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698