Chromium Code Reviews| 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()); |