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

Unified Diff: sdk/lib/async/event_loop.dart

Issue 26151002: Rename runAsync to scheduleMicrotask. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix 80 chars lines Created 7 years, 2 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
Index: sdk/lib/async/event_loop.dart
diff --git a/sdk/lib/async/event_loop.dart b/sdk/lib/async/event_loop.dart
index 94137da655b61c61739078757e06e6c8a36c0a9d..89fb52f60a53d20df6c5ab9956df85a56e37c696 100644
--- a/sdk/lib/async/event_loop.dart
+++ b/sdk/lib/async/event_loop.dart
@@ -54,10 +54,10 @@ void _scheduleAsyncCallback(callback) {
* foo();
* }
*/
-void runAsync(void callback()) {
+void scheduleMicrotask(void callback()) {
if (Zone.current == Zone.ROOT) {
- // No need to bind the callback. We know that the root's runAsync will
- // be invoked in the root zone.
+ // No need to bind the callback. We know that the root's scheduleMicrotask
+ // will be invoked in the root zone.
Zone.current.scheduleMicrotask(callback);
return;
}
@@ -65,6 +65,14 @@ void runAsync(void callback()) {
Zone.current.bindCallback(callback, runGuarded: true));
}
+/**
+ * *DEPRECATED*. Use [scheduleMicrotask] instead.
+ */
+@deprecated
+void asyncRun(void callback()) {
Lasse Reichstein Nielsen 2013/10/07 07:17:03 runAsync?
floitsch 2013/10/10 16:00:36 ouch. yes.
+ scheduleMicrotask(callback);
+}
+
class _AsyncRun {
/** Enqueues the given callback before any other event in the event-loop. */
external static void _enqueueImmediate(void callback());

Powered by Google App Engine
This is Rietveld 408576698