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

Timers should be allowed in browser isolates #21925

Closed
yjbanov opened this issue Dec 19, 2014 · 7 comments
Closed

Timers should be allowed in browser isolates #21925

yjbanov opened this issue Dec 19, 2014 · 7 comments
Assignees

Comments

@yjbanov
Copy link

yjbanov commented Dec 19, 2014

To reproduce:

import 'dart:async';
void main(args, sendPort) {
  Timer.run(() {});
}

This throws: "UnimplementedError: Timers on background isolates are not supported in the browser"

Since isolates compile down to web workers in the browser this functionality should be available.

More info: section "Features Available to Workers" at http://www.html5rocks.com/en/tutorials/workers/basics/

@lrhn
Copy link
Member

lrhn commented Dec 19, 2014

I'm guessing this is Dartium giving the error.


Added Area-Dartium, Triaged labels.

@yjbanov
Copy link
Author

yjbanov commented Dec 19, 2014

Correct, but you are bringing up a good point. It needs to work in both Dartium and in compiled JS.

@DartBot
Copy link

DartBot commented Dec 20, 2014

This comment was originally written by @zoechi


Using timers in Browser marked as fixed a long time ago (http://dartbug.com/4997)

I think these issues are similar/related
http://dartbug.com/10223
http://dartbug.com/13921
http://dartbug.com/14080
http://dartbug.com/16565
http://dartbug.com/16965 why is this one marked as fixed?
http://dartbug.com/17649
http://dartbug.com/21573

@DartBot
Copy link

DartBot commented Dec 21, 2014

This comment was originally written by @yjbanov


#­4997 does spawnFunction. I only tried spawning from URI. That might be the difference.

@sethladd
Copy link
Contributor

cc @a-siva.
Removed the owner.

@floitschG
Copy link
Contributor

Issue #14080 tracks a similar issue (for 'print').

@alan-knight
Copy link
Contributor

This is fixed for 1.9. Isolate.spawnUri still creates a VM isolate in Dartium (i.e. not a WebWorker) but print and timers work, in a somewhat hacky way.


Set owner to @alan-knight.
Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants