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

Unified Diff: lib/isolate/frog/isolateimpl.dart

Issue 9652001: SendPort + ReceivePort changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
« no previous file with comments | « frog/minfrog ('k') | lib/isolate/frog/messages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate/frog/isolateimpl.dart
diff --git a/lib/isolate/frog/isolateimpl.dart b/lib/isolate/frog/isolateimpl.dart
index 09fb97d3812954e55c7ecf53497ba23adff89081..84ff343ec77ad6d5d5102d710ef1ef5666bdd8ca 100644
--- a/lib/isolate/frog/isolateimpl.dart
+++ b/lib/isolate/frog/isolateimpl.dart
@@ -308,8 +308,9 @@ class _IsolateNatives {
/** JavaScript-specific implementation to spawn an isolate. */
static Future<SendPort> spawn(Isolate isolate, bool isLight) {
Completer<SendPort> completer = new Completer<SendPort>();
- ReceivePort port = new ReceivePort.singleShot();
+ ReceivePort port = new ReceivePort();
port.receive((msg, SendPort replyPort) {
+ port.close();
assert(msg == _SPAWNED_SIGNAL);
completer.complete(replyPort);
});
@@ -558,8 +559,9 @@ class _IsolateNatives {
static _spawn2(String functionName, String uri, bool isLight) {
Completer<SendPort> completer = new Completer<SendPort>();
- ReceivePort port = new ReceivePort.singleShot();
+ ReceivePort port = new ReceivePort();
port.receive((msg, SendPort replyPort) {
+ port.close();
assert(msg == _SPAWNED_SIGNAL);
completer.complete(replyPort);
});
« no previous file with comments | « frog/minfrog ('k') | lib/isolate/frog/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698