-
Notifications
You must be signed in to change notification settings - Fork 675
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
Provide documentation on how to use web workers for Dart 2 #4749
Comments
Yet certainly needed... Just posted this on slack, have spent too much time on stuff that should be simple. |
A somewhat related issue, dart-lang/sdk#35730 concerning web workers. This area is ripe for some programmer guidance. |
I see the same thing over and over in the wild, programmers with no guidance on how to use Web Workers (does it even work with Dart 2?) trying to come up with hacks, left to their own devices: |
See dart-lang/sdk#35730 (comment) – @sigmundch is running on this! |
Yeah I would also like some documentation/examples on this. |
Throwing this over to web (@vsmenon ) to see what they think the solution is: better API docs on the Worker class? An article? |
I think the kicker here is web workers don't work with DDC: dart-lang/sdk#36295 |
Dart SDK Version 2
Windows, MacOS
Chrome
I decided to try out Dart 2, and one of the first things I wanted to look into is how to run workers on the web, since
Isolate
is no longer available for the web. Here is the documentation: https://api.dartlang.org/stable/2.0.0/dart-html/Worker-class.htmlThere is no indication whatsoever on how to proceed on such an important web feature, given the ever-increasing importance of concurrent computation on modern systems.
Some questions that immediately spring to mind:
In a more general sense, Dart documentation for web APIs is not a good experience. Are those docs simply generated from browser IDL? Those docs should contain API overview, working examples for each function where not immediately obvious, links to articles, etc...Almost every page I visit is just method and property names. There's no guidance for the programmer.
The text was updated successfully, but these errors were encountered: