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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/message.h ('K') | « runtime/vm/message.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.io; 5 part of dart.io;
6 6
7 // Constants used when working with native ports. 7 // Constants used when working with native ports.
8 // These must match the constants in runtime/bin/dartutils.h class CObject. 8 // These must match the constants in runtime/bin/dartutils.h class CObject.
9 const int _SUCCESS_RESPONSE = 0; 9 const int _SUCCESS_RESPONSE = 0;
10 const int _ILLEGAL_ARGUMENT_RESPONSE = 1; 10 const int _ILLEGAL_ARGUMENT_RESPONSE = 1;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 newBuffer[i] = value; 116 newBuffer[i] = value;
117 j++; 117 j++;
118 } 118 }
119 return new _BufferAndStart(newBuffer, 0); 119 return new _BufferAndStart(newBuffer, 0);
120 } 120 }
121 121
122 122
123 class _IOCrypto { 123 class _IOCrypto {
124 external static Uint8List getRandomBytes(int count); 124 external static Uint8List getRandomBytes(int count);
125 } 125 }
126
127 _getEnqueueImmediateFactoryClosure() {
128 return (void callback()) {
129 var port = new ReceivePort();
130 port.receive((msg, reply) {
131 port.close();
132 callback();
133 });
134 _DartAPI._sendPriority(port, null);
135 };
136 }
137
138 class _DartAPI {
139 external static void _sendPriority(port, msg);
140 }
OLDNEW
« 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