dart-lang / dart-lang/language

The `async*` function `yield` should work well with `await for`.

Open
#121 2 comments 44 reactions 1 assignee Claimed by @lrhn View on GitHub
feature
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

The `async*` function `yield` is specified to wait until the event has been delivered, giving the receiver time to pause or cancel in (immediate) response to receiving the event.

Implementations do not wait for the receiver. This makes it hard and inefficient to write `async*` functions that do not do too much work.
The implementations should follow the specification and make the user experience better.

Associated [feature specification](https://github.com/dart-lang/language/blob/master/accepted/future-releases/async-star-behavior/feature-specification.md) has more details.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.