OLD | NEW |
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 "async.dart"; |
6 | 6 |
7 typedef void _AsyncCallback(); | 7 typedef void _AsyncCallback(); |
8 | 8 |
9 class _AsyncCallbackEntry { | 9 class _AsyncCallbackEntry { |
10 final _AsyncCallback callback; | 10 final _AsyncCallback callback; |
11 _AsyncCallbackEntry next; | 11 _AsyncCallbackEntry next; |
12 _AsyncCallbackEntry(this.callback); | 12 _AsyncCallbackEntry(this.callback); |
13 } | 13 } |
14 | 14 |
15 /** Head of single linked list of pending callbacks. */ | 15 /** Head of single linked list of pending callbacks. */ |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return; | 145 return; |
146 } | 146 } |
147 Zone.current | 147 Zone.current |
148 .scheduleMicrotask(Zone.current.bindCallback(callback, runGuarded: true)); | 148 .scheduleMicrotask(Zone.current.bindCallback(callback, runGuarded: true)); |
149 } | 149 } |
150 | 150 |
151 class _AsyncRun { | 151 class _AsyncRun { |
152 /** Schedule the given callback before any other event in the event-loop. */ | 152 /** Schedule the given callback before any other event in the event-loop. */ |
153 external static void _scheduleImmediate(void callback()); | 153 external static void _scheduleImmediate(void callback()); |
154 } | 154 } |
OLD | NEW |