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

Document asynchronous order of operations. #10072

Closed
DartBot opened this issue Apr 20, 2013 · 4 comments
Closed

Document asynchronous order of operations. #10072

DartBot opened this issue Apr 20, 2013 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-a library-async P2 A bug or feature request we're likely to work on type-documentation A request to add or improve documentation

Comments

@DartBot
Copy link

DartBot commented Apr 20, 2013

This issue was originally filed by amouravski@google.com


I'm never sure if runSync is before Future.sync, etc. The documentation should be clear about how multiple Futures work together.

This should be in the doc comments of the async library.

@iposva-google
Copy link
Contributor

Added Triaged label.

@floitschG
Copy link
Contributor

Current behavior is that event handling is allowed (even encouraged) to shortcut the event-loop.
Several reasons:

  • more efficient (although it fills up the call-stack).
  • binds related code units tighter together: a then chain (future.then.then.then) will be executed without other code interrupting.
  • makes it easier to implement (and reason of) streams. When an event fires we don't want any other code to be able to pause/resume/cancel a subscription. There are still some open issues with "reentrant" code, where the event-handler changes the subscription.

Issue is accepted (similar to all documentation bugs).


Added Accepted label.

@floitschG
Copy link
Contributor

Added Ready-to-implement label.

@DartBot DartBot added type-documentation A request to add or improve documentation Priority-Medium area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-async labels May 6, 2013
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed accepted labels Feb 29, 2016
@lrhn lrhn added the core-a label Aug 11, 2017
@natebosch
Copy link
Member

The docs for dart:async link to a few pages, including https://webdev.dartlang.org/articles/performance/event-loop which I think does a good job at explaining ordering.

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 library-async P2 A bug or feature request we're likely to work on type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

7 participants