dart-lang / dart-lang/language
The `async*` function `yield` should work well with `await for`.
Open
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
Assessment
This issue has not been assessed yet.