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

Issue 179823002: Add Isolate.onExit. (Closed)

Created:
6 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add Isolate.onExit. Implemented on dart2js. Tentative design. Comments welcome. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=33268

Patch Set 1 #

Total comments: 7

Patch Set 2 : Keep isolate methods simple. #

Patch Set 3 : Update comments. #

Patch Set 4 : Test removeOnExitListener #

Total comments: 10

Patch Set 5 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -13 lines) Patch
M sdk/lib/_internal/lib/isolate_helper.dart View 1 2 3 4 6 chunks +39 lines, -5 lines 0 comments Download
M sdk/lib/isolate/isolate.dart View 1 2 3 4 4 chunks +57 lines, -8 lines 0 comments Download
M tests/isolate/isolate.status View 1 1 chunk +1 line, -0 lines 0 comments Download
A tests/isolate/ondone_test.dart View 1 2 3 4 1 chunk +94 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Lasse Reichstein Nielsen
6 years, 10 months ago (2014-02-25 13:04:00 UTC) #1
floitsch
FYI (haven't yet finished thinking about it). Eventually we will probably want to be able ...
6 years, 10 months ago (2014-02-25 19:25:48 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/179823002/diff/1/sdk/lib/isolate/isolate.dart File sdk/lib/isolate/isolate.dart (right): https://codereview.chromium.org/179823002/diff/1/sdk/lib/isolate/isolate.dart#newcode47 sdk/lib/isolate/isolate.dart:47: * the isolate. Would "observe" be a better word. ...
6 years, 9 months ago (2014-02-27 08:04:27 UTC) #3
Lasse Reichstein Nielsen
PTAL
6 years, 9 months ago (2014-03-03 11:43:31 UTC) #4
Søren Gjesse
DBC Please change the subject of the change to match the actual implementation better. https://codereview.chromium.org/179823002/diff/60001/sdk/lib/_internal/lib/isolate_helper.dart ...
6 years, 9 months ago (2014-03-04 10:16:25 UTC) #5
floitsch
LGTM. Willing to discuss the need for a capability for onExit, but I don't think ...
6 years, 9 months ago (2014-03-04 12:00:16 UTC) #6
Lasse Reichstein Nielsen
Committed patchset #5 manually as r33268 (presubmit successful).
6 years, 9 months ago (2014-03-04 12:12:58 UTC) #7
Søren Gjesse
On 2014/03/04 12:00:16, floitsch wrote: > LGTM. > Willing to discuss the need for a ...
6 years, 9 months ago (2014-03-04 13:44:33 UTC) #8
Lasse Reichstein Nielsen
6 years, 9 months ago (2014-03-06 09:26:11 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/179823002/diff/60001/sdk/lib/_internal/lib/is...
File sdk/lib/_internal/lib/isolate_helper.dart (right):

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/_internal/lib/is...
sdk/lib/_internal/lib/isolate_helper.dart:307: void addDoneListener(SendPort
response) {
On 2014/03/04 10:16:25, Søren Gjesse wrote:
> Use name responsePort as in isolate.dart.

Done.

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/_internal/lib/is...
sdk/lib/_internal/lib/isolate_helper.dart:317: void removeDoneListener(SendPort
response) {
On 2014/03/04 10:16:25, Søren Gjesse wrote:
> Ditto.

Done.

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/isolate/isolate....
File sdk/lib/isolate/isolate.dart (right):

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/isolate/isolate....
sdk/lib/isolate/isolate.dart:90: /**
On 2014/03/04 10:16:25, Søren Gjesse wrote:
> I think we should move the WARNING up as the first line in the comment, and
> extend it to also say that this is still experimental.

Done.

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/isolate/isolate....
sdk/lib/isolate/isolate.dart:155: * send a reply if the receiving isolate is
dead?
On 2014/03/04 10:16:25, Søren Gjesse wrote:
> Add the warning as for pause/resume.

Done.

https://codereview.chromium.org/179823002/diff/60001/sdk/lib/isolate/isolate....
sdk/lib/isolate/isolate.dart:157: void addOnExitListener(SendPort responsePort)
{
No. It's considered harmless. You don't leak any information from the isolate. 
If you have the isolate object, you can send control messages to it, including
this and the "ping" operation. To avoid that, don't give access to the isolate
(in this case, you can treat the control port itself as the capability needed
for these operations).

Powered by Google App Engine
This is Rietveld 408576698