1
0
mirror of https://github.com/danog/amp.git synced 2024-12-03 18:07:57 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Aaron Piotrowski
5e521daa16
Rename to Pipeline 2020-09-24 12:53:31 -05:00
Aaron Piotrowski
52d50a5b6d
Revert adding onDisposal() and onCompletion()
This largely reverts 6ab9048e717bb1f69f418d82e697a968721115c0.
2020-09-24 12:53:31 -05:00
Aaron Piotrowski
dd0f01f4db
Add onDisposal() and onCompletion() to Stream
onCompletion callbacks are invoked if complete() or fail() is called before the stream is disposed.

onDisposal callbacks are invoked if the stream is disposed before being completed or failed.

Forbid failing a stream with DisposedException.
2020-09-24 12:53:31 -05:00
Aaron Piotrowski
1577906fc1
Make AsyncGenerator execution lazy
Matches behavior of Generator which does not start execution until an iteration method is invoked.
2020-09-24 12:53:30 -05:00
Aaron Piotrowski
66f0deb563
Drop YieldedValue 2020-09-24 12:53:29 -05:00
Aaron Piotrowski
8df006b011
Remove unnecessary internal interface
Switched Yielder trait to a concrete class YieldSource.
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
d496c9db24
Resolve promise with YieldedValue
A suggested alternative to resolving with [$yieldedValue] since static analysis (specifically Psalm) doesn't play well with that API.

Will revert if Psalm changes or we decide to resolve with [$yieldedValue] anyway.
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
57924690fe
Remove key 2020-09-24 12:53:29 -05:00
Aaron Piotrowski
96007f11aa
Add Streams 2020-09-24 12:53:27 -05:00