Skip to content

Commit

Permalink
resolve() accepts callables returning generators - added to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed May 11, 2016
1 parent 3ab10de commit 92e0042
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.2.0
-----

- resolve() now also accepts callables returning Generators.

### 1.1.1

- Fix memory leak in NativeReactor, retaining an empty array
Expand Down
2 changes: 1 addition & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ function coroutine(callable $func) {
* Upon resolution the Generator return value is used to succeed the promised result. If an
* error occurs during coroutine resolution the returned promise fails.
*
* @param \Generator|callable $generator A generator or callable the returns a generator to resolve as a coroutine
* @param \Generator|callable $generator A generator or callable that returns a generator to resolve as a coroutine
* @return \Amp\Promise
*/
function resolve($generator) {
Expand Down

0 comments on commit 92e0042

Please sign in to comment.