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

Future called from isolate fails. #14906

Closed
DartBot opened this issue Nov 7, 2013 · 9 comments
Closed

Future called from isolate fails. #14906

DartBot opened this issue Nov 7, 2013 · 9 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-isolate

Comments

@DartBot
Copy link

DartBot commented Nov 7, 2013

This issue was originally filed by incre...@gmail.com


main.dart - Launches isolate and prints received messages.
=========
import 'dart:isolate';
main() {
  ReceivePort port = new ReceivePort()
  ..listen((msg) => print('msg: $msg'));

   Isolate.spawnUri(Uri.parse("isolate.dart"), [], port.sendPort);
}

isolate.dart - Isolate file.
============
import 'dart:async';
import 'dart:isolate';
void main(List<String> args, SendPort replyTo) {
  // This is OK.
  replyTo.send('Direct message');
  // This FAILS.
  new Future.value('Future message').then(replyTo.send);
}

Dart SDK version 0.8.10.8_r30039
Chromium 31.0.1650.39 (1587)
Windows 7 64

@anders-sandholm
Copy link
Contributor

Added Area-Library, Library-Isolate, Triaged labels.

@lrhn
Copy link
Member

lrhn commented Nov 18, 2013

I cannot reproduce this problem with the current dart VM on the command line.
The main isolate receives two messages and prints them both.

How, exactly, are you running the program?


Added NeedsInfo label.

@DartBot
Copy link
Author

DartBot commented Nov 18, 2013

This comment was originally written by increo...@gmail.com


It is web application, Dartium loads HTML page and runs Dart script.

@floitschG
Copy link
Contributor

This is probably because the dartium isolates don't support Timer (which is currently used by scheduleMicrotask).


Added Accepted label.

@DartBot
Copy link
Author

DartBot commented Dec 3, 2013

This comment was originally written by increos...@gmail.com


This problem was already been solved in spring 2013 (in old Isolate library) - see Issue #9135.

@floitschG
Copy link
Contributor

We recently had a regression where isolates in Dartium cannot use microtasks (which are usually used to complete Futures) and Timers.
I have already a CL prepared for fixing the microtasks. The timers might take longer.

@DartBot
Copy link
Author

DartBot commented Apr 23, 2014

This comment was originally written by brendand...@google.com


+1 for Timer support for background isolates

@DartBot
Copy link
Author

DartBot commented Jul 15, 2014

This comment was originally written by pablomartinez.angeros...@gmail.com


I have the same problem too! I need get the Future Chrome History in an Isolated process... and is no possible.

@lrhn
Copy link
Member

lrhn commented Oct 6, 2014

I think the fix has landed, the example works now.


Added AssumedStale label.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate closed-obsolete Closed as the reported issue is no longer relevant labels Oct 6, 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-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-isolate
Projects
None yet
Development

No branches or pull requests

5 participants