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

Zone, isolates and Worker are poorly documented #17667

Open
yjbanov opened this issue Mar 20, 2014 · 6 comments
Open

Zone, isolates and Worker are poorly documented #17667

yjbanov opened this issue Mar 20, 2014 · 6 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-a docs-api library-async type-documentation A request to add or improve documentation

Comments

@yjbanov
Copy link

yjbanov commented Mar 20, 2014

What steps will reproduce the problem?

  1. https://api.dartlang.org/apidocs/channels/stable/#dart-async.Zone
  2. https://api.dartlang.org/apidocs/channels/stable/#dart-isolate
  3. https://api.dartlang.org/apidocs/channels/stable/#dart-dom-html.Worker

Zone


The documentation is not detailed. The concepts are defined via uncommon terms. For example, Zone is defined via "dynamic extent", which is not a common term (only that it comes from Common Lisp :), sorry couldn't resist). Same goes for the concepts "bind" and "register". The docs use casual language (e.g. "gives the zone a chance to wrap the callback", or "asynchronous version of"), which is ok to get an intuitive sense of what they mean, but they should be backed by details using a stricter language. Some terms are defined recursively (e.g. registerCallback "registers the given callback"), which is not helpful.

isolates


It's safe to say this library is not documented at all. The link provided at the top is broken. It probably meant to link to https://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#isolates, but even there you won't find any details.

Worker


The docs are an excerpt from MDN, which document the JavaScript API. For instance, Dart doesn't have XMLHttpRequest. There is also no discussion about the differences between isolates and workers. In fact the docs for isolates overload the meaning of "worker" by describing isolates as "independent workers".

@kwalrath
Copy link
Contributor

True enough. We should probably split this bug up since it covers several areas. For now, I've assigned it to the dart:async library.

Note that Florian has written a Zones article, which you can preview (in draft form) at:
https://zones-dot-dart-lang.appspot.com/articles/zones/


Added Docs-API, Area-Library, Library-Async, Triaged labels.

@yjbanov
Copy link
Author

yjbanov commented Mar 20, 2014

Love Florian's articles! Maybe add a link to the article from the API docs for now?

@kwalrath
Copy link
Contributor

kwalrath commented Jun 4, 2014

Removed Type-Defect label.
Added Type-Documentation label.

@yjbanov yjbanov added Priority-Unassigned docs-api area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-async type-documentation A request to add or improve documentation labels Jun 4, 2014
@lrhn lrhn added the core-a label Aug 11, 2017
@PandaGeek1024
Copy link

The article is gone, i will never be able to understand zone.

@maks
Copy link

maks commented Feb 2, 2021

@PandaGeek1024 the article on zones is still available though archived.

@maks
Copy link

maks commented Feb 2, 2021

What I find very undocumented is the interaction between Zones and Isolates.
I'm currently trying to understand why a test I'm trying to write using FakeAsync (which makes use of zones) doesn't seem to work with a stream linked to an isoloates SendPort and there seems to be no documentation at all about how Zones work (or don't) with Isolates.

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. core-a docs-api library-async type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

6 participants