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

Side by Side Diff: sdk/lib/async/schedule_microtask.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.async; 5 part of dart.async;
6 6
7 typedef void _AsyncCallback(); 7 typedef void _AsyncCallback();
8 8
9 bool _callbacksAreEnqueued = false; 9 bool _callbacksAreEnqueued = false;
10 Queue<_AsyncCallback> _asyncCallbacks = new Queue<_AsyncCallback>(); 10 Queue<_AsyncCallback> _asyncCallbacks = new Queue<_AsyncCallback>();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (Zone.current == Zone.ROOT) { 64 if (Zone.current == Zone.ROOT) {
65 // No need to bind the callback. We know that the root's scheduleMicrotask 65 // No need to bind the callback. We know that the root's scheduleMicrotask
66 // will be invoked in the root zone. 66 // will be invoked in the root zone.
67 Zone.current.scheduleMicrotask(callback); 67 Zone.current.scheduleMicrotask(callback);
68 return; 68 return;
69 } 69 }
70 Zone.current.scheduleMicrotask( 70 Zone.current.scheduleMicrotask(
71 Zone.current.bindCallback(callback, runGuarded: true)); 71 Zone.current.bindCallback(callback, runGuarded: true));
72 } 72 }
73 73
74 /**
75 * *DEPRECATED*. Use [scheduleMicrotask] instead.
76 */
77 @deprecated
78 void runAsync(void callback()) {
79 scheduleMicrotask(callback);
80 }
81
82 class _AsyncRun { 74 class _AsyncRun {
83 /** Schedule the given callback before any other event in the event-loop. */ 75 /** Schedule the given callback before any other event in the event-loop. */
84 external static void _scheduleImmediate(void callback()); 76 external static void _scheduleImmediate(void callback());
85 } 77 }
OLDNEW
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698