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

Unified Diff: sdk/lib/io/common.dart

Issue 25646004: Add Dart_PostPriority function to dart_api, and use it in runAsync to schedule immediate events in … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More cleanup 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
« runtime/vm/message.h ('K') | « runtime/vm/message.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/common.dart
diff --git a/sdk/lib/io/common.dart b/sdk/lib/io/common.dart
index 5f1700fc0874785dda8b2c437ffde0a97f12b270..3f45419a54c18f21403ff94f1615e42766e1b912 100644
--- a/sdk/lib/io/common.dart
+++ b/sdk/lib/io/common.dart
@@ -123,3 +123,18 @@ _BufferAndStart _ensureFastAndSerializableByteData(
class _IOCrypto {
external static Uint8List getRandomBytes(int count);
}
+
+_getEnqueueImmediateFactoryClosure() {
+ return (void callback()) {
+ var port = new ReceivePort();
+ port.receive((msg, reply) {
+ port.close();
+ callback();
+ });
+ _DartAPI._sendPriority(port, null);
+ };
+}
+
+class _DartAPI {
+ external static void _sendPriority(port, msg);
+}
« runtime/vm/message.h ('K') | « runtime/vm/message.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698