Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawnFunction(...).call(...).then left hanging if exception in port.receive #9315

Closed
kevmoo opened this issue Mar 20, 2013 · 3 comments
Closed
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-isolate

Comments

@kevmoo
Copy link
Member

kevmoo commented Mar 20, 2013

import 'dart:async';
import 'dart:isolate';

void main() {
  spawnFunction(runTest)
    .call(true)
    .then((String msg) {
      print(msg);
    })
    .catchError((e) {
      print("error!");
      print(e);
    });
  print("well?");
}

void runTest() {
  port.receive((bool shouldThrow, sendport) {
    if(shouldThrow) {
      throw 'you asked for it';
    } else {
      sendport.send('all good');
    }
  });
}

What is the expected output? What do you see instead?

Expected: print out "Error!" plus the serialized exception
Actual: app hangs

What version of the product are you using? On what operating system?

0.4.2.8 r20259

@kevmoo
Copy link
Member Author

kevmoo commented Mar 20, 2013

cc @floitschG.
cc @lrhn.
Added Triaged label.

@DartBot
Copy link

DartBot commented Apr 8, 2013

This comment was originally written by amouravski@google.com


Added Area-Library label.

@lrhn
Copy link
Member

lrhn commented Oct 7, 2014

Added AssumedStale label.

@kevmoo kevmoo added Type-Defect library-isolate area-library closed-obsolete Closed as the reported issue is no longer relevant labels Oct 7, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-isolate
Projects
None yet
Development

No branches or pull requests

3 participants