-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Unable to spawn a dart-enabled web worker #21573
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
Comments
Do we even support the Worker class in Dartium? Bumping to high for internal customer. cc @terrylucas. |
cc @cbracken. |
This comment was originally written by @pjako Dart in Webworkers was removed years ago, even if you compile to javascript you have no access to the worker context (and no possibility to use HttpRequest). Related issue: |
This comment was originally written by [email protected] Why was it removed? Building a scaleable application is very limited in Dart if you don't have access to RPCs. |
Added this to the 1.9 milestone. |
This comment was originally written by @pjako The reason was that isolates are darts concurrency story not workers, which is fine. But isolates still lack in term of api in the browser, An isolate in the browser should be at least as powerful as a workers.in javascript. (IndexDB api, transferable arrays, XMLHttpRequest and all the other stuff that the worker context offers.) |
This comment was originally written by @si-robertson Is this on target for 1.9? It would be extremely useful to be able to run Dart scripts in web workers. |
This change is not currently targeted for 1.9. Removed this from the 1.9 milestone. |
Added this to the 1.10 milestone. |
Marked this as blocking #22862. |
This issue was originally filed by [email protected]
What steps will reproduce the problem?
import 'dart:html';
void main() {
var worker = new Worker('worker.dart');
}
<html>
<body>
<script type="application/dart" src="main.dart"></script>
</body>
</html>
void main() {
// Intentionally left blank.
}
What is the expected output? What do you see instead?
In Dartium, enter chrome://version and paste the results here.
Please provide any additional information below:
I need to create a web worker, in Dart, that has access to Timers and XmlHttpRequest. dart:isolate does not support this. dart:html.Worker does, in theory, but workers are not able to be used, at least in Dartium.
The text was updated successfully, but these errors were encountered: