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

Side by Side Diff: lib/isolate/base.dart

Issue 10928139: Changed interfaces to abstract classes where possible in {lib,samples,pkg} (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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 class IsolateSpawnException implements Exception { 5 class IsolateSpawnException implements Exception {
6 const IsolateSpawnException(String this._s); 6 const IsolateSpawnException(String this._s);
7 String toString() => "IsolateSpawnException: '$_s'"; 7 String toString() => "IsolateSpawnException: '$_s'";
8 final String _s; 8 final String _s;
9 } 9 }
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 */ 43 */
44 external SendPort spawnUri(String uri); 44 external SendPort spawnUri(String uri);
45 45
46 /** 46 /**
47 * [SendPort]s are created from [ReceivePort]s. Any message sent through 47 * [SendPort]s are created from [ReceivePort]s. Any message sent through
48 * a [SendPort] is delivered to its respective [ReceivePort]. There might be 48 * a [SendPort] is delivered to its respective [ReceivePort]. There might be
49 * many [SendPort]s for the same [ReceivePort]. 49 * many [SendPort]s for the same [ReceivePort].
50 * 50 *
51 * [SendPort]s can be transmitted to other isolates. 51 * [SendPort]s can be transmitted to other isolates.
52 */ 52 */
53 interface SendPort extends Hashable { 53 abstract class SendPort implements Hashable {
54 54
55 /** 55 /**
56 * Sends an asynchronous [message] to this send port. The message is copied to 56 * Sends an asynchronous [message] to this send port. The message is copied to
57 * the receiving isolate. If specified, the [replyTo] port will be provided to 57 * the receiving isolate. If specified, the [replyTo] port will be provided to
58 * the receiver to facilitate exchanging sequences of messages. 58 * the receiver to facilitate exchanging sequences of messages.
59 * 59 *
60 * The content of [message] can be: primitive values (null, num, bool, double, 60 * The content of [message] can be: primitive values (null, num, bool, double,
61 * String), instances of [SendPort], and lists and maps whose elements are any 61 * String), instances of [SendPort], and lists and maps whose elements are any
62 * of these. List and maps are also allowed to be cyclic. 62 * of these. List and maps are also allowed to be cyclic.
63 * 63 *
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 /** 131 /**
132 * Creates a new send port that sends to this receive port. It is legal to 132 * Creates a new send port that sends to this receive port. It is legal to
133 * create several [SendPort]s from the same [ReceivePort]. 133 * create several [SendPort]s from the same [ReceivePort].
134 */ 134 */
135 SendPort toSendPort(); 135 SendPort toSendPort();
136 136
137 } 137 }
138 138
139 // TODO(kasperl): Make this hashable and document it. 139 // TODO(kasperl): Make this hashable and document it.
140 interface SendPortSync { 140 abstract class SendPortSync {
141 141
142 callSync(var message); 142 callSync(var message);
143 143
144 } 144 }
145 145
146 class _ReceivePortFactory { 146 class _ReceivePortFactory {
147 external factory ReceivePort(); 147 external factory ReceivePort();
148 } 148 }
OLDNEW
« no previous file with comments | « lib/crypto/crypto.dart ('k') | lib/utf/utf_core.dart » ('j') | lib/utf/utf_core.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698