732ab1ce4d
BUG= R=floitsch@google.com Review URL: https://codereview.chromium.org//26993002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28653 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
824 B
Dart
26 lines
824 B
Dart
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
patch class _AsyncRun {
|
|
/* patch */ static void _scheduleImmediate(void callback()) {
|
|
if (_ScheduleImmediate._closure == null) {
|
|
// TODO(9001): don't default to using the Timer to enqueue the immediate
|
|
// callback.
|
|
_createTimer(Duration.ZERO, callback);
|
|
return;
|
|
}
|
|
_ScheduleImmediate._closure(callback);
|
|
}
|
|
}
|
|
|
|
typedef void _ScheduleImmediateClosure(void callback());
|
|
|
|
class _ScheduleImmediate {
|
|
static _ScheduleImmediateClosure _closure;
|
|
}
|
|
|
|
void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) {
|
|
_ScheduleImmediate._closure = closure;
|
|
}
|