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

Issue 9521007: isolates: remove Isolate2 interface, add top-level spawn functions, more comments (Closed)

Created:
8 years, 9 months ago by Siggi Cherem (dart-lang)
Modified:
8 years, 9 months ago
Reviewers:
eub
CC:
reviews_dartlang.org, kasperl, turnidge
Visibility:
Public.

Description

isolates: remove Isolate2 interface, add the top-level spawning functions, add more comments, adapt tests to this API. Committed: https://code.google.com/p/dart/source/detail?r=4729

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -197 lines) Patch
M lib/isolate/frog/isolateimpl.dart View 6 chunks +6 lines, -14 lines 0 comments Download
M lib/isolate/isolate_api.dart View 1 2 5 chunks +48 lines, -38 lines 0 comments Download
M lib/isolate/isolate_compiler.dart View 1 chunk +5 lines, -8 lines 0 comments Download
M lib/isolate/isolate_frog.dart View 2 chunks +44 lines, -13 lines 0 comments Download
M runtime/lib/isolate.dart View 1 chunk +8 lines, -7 lines 0 comments Download
M tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart View 1 chunk +9 lines, -9 lines 0 comments Download
M tests/isolate/src/APIv2_spawnBrowserTest.dart View 1 2 1 chunk +9 lines, -9 lines 0 comments Download
M tests/isolate/src/APIv2_spawnStandaloneNegativeTest.dart View 1 chunk +5 lines, -5 lines 0 comments Download
M tests/isolate/src/APIv2_spawnStandaloneTest.dart View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M tests/isolate/src/APIv2_spawnUriBrowserNegativeTest.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/isolate/src/APIv2_spawnUriBrowserTest.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/isolate/src/APIv2_spawnUriChildIsolate.dart View 1 chunk +2 lines, -10 lines 0 comments Download
M tests/isolate/src/APIv2_unresolvedPortsBrowserNegativeTest.dart View 1 2 1 chunk +21 lines, -21 lines 0 comments Download
M tests/isolate/src/APIv2_unresolvedPortsBrowserTest.dart View 1 2 1 chunk +21 lines, -21 lines 0 comments Download
M tests/isolate/src/APIv2_unresolvedPortsStandaloneNegativeTest.dart View 1 chunk +16 lines, -16 lines 0 comments Download
M tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart View 1 chunk +16 lines, -16 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Siggi Cherem (dart-lang)
8 years, 9 months ago (2012-02-28 23:09:01 UTC) #1
eub
Yay! LGTM with comment tweaks. http://codereview.chromium.org/9521007/diff/2001/lib/isolate/isolate_api.dart File lib/isolate/isolate_api.dart (right): http://codereview.chromium.org/9521007/diff/2001/lib/isolate/isolate_api.dart#newcode28 lib/isolate/isolate_api.dart:28: // Note this feature ...
8 years, 9 months ago (2012-02-29 00:20:14 UTC) #2
Siggi Cherem (dart-lang)
8 years, 9 months ago (2012-02-29 00:37:15 UTC) #3
Thanks Eli!

http://codereview.chromium.org/9521007/diff/2001/lib/isolate/isolate_api.dart
File lib/isolate/isolate_api.dart (right):

http://codereview.chromium.org/9521007/diff/2001/lib/isolate/isolate_api.dart...
lib/isolate/isolate_api.dart:28: // Note this feature is not yet available
On 2012/02/29 00:20:14, eub wrote:
> ?

oops, got distracted midsentence :) - "... in the vm"

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_spaw...
File tests/isolate/src/APIv2_spawnBrowserTest.dart (right):

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_spaw...
tests/isolate/src/APIv2_spawnBrowserTest.dart:5: // example of spawning an
isolate from a closure
On 2012/02/29 00:20:14, eub wrote:
> "from a function" 
> and in standalone test

Done.

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_spaw...
tests/isolate/src/APIv2_spawnBrowserTest.dart:12: port.receive((msg, reply) =>
reply.send('re: $msg'));
On 2012/02/29 00:20:14, eub wrote:
> Style reaction: sure looks weird to use that toplevel port without prefixing.
:)

I agree.

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_spaw...
File tests/isolate/src/APIv2_spawnUriChildIsolate.dart (left):

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_spaw...
tests/isolate/src/APIv2_spawnUriChildIsolate.dart:16: isolateMain(null);
On 2012/02/29 00:20:14, eub wrote:
> (What made this one go away?)

Actually a combination of this CL and the introduction of 'dart:isolate':
- when I did the latter, we changed frog so that it generates isolate code if
this library is imported. This removed the adhoc trick of using "new
ReceivePort()" to indicate that we needed the isolate code in this program.

- after this CL, [main] is the child isolate's entrypoint, which unlike
[isolateMain], frog knows that it can't be tree-shaken.

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_unre...
File tests/isolate/src/APIv2_unresolvedPortsBrowserTest.dart (right):

http://codereview.chromium.org/9521007/diff/2001/tests/isolate/src/APIv2_unre...
tests/isolate/src/APIv2_unresolvedPortsBrowserTest.dart:11: // This is similar
as SpawnFromCodeAPIv2Test but using 'unittest.dart' so it can
On 2012/02/29 00:20:14, eub wrote:
> s/SpawnFromCodeAPIv2Test/APIv2_unresolvedPortsStandaloneTest/?
> and in negative

Done.

Powered by Google App Engine
This is Rietveld 408576698