Skip to content

Commit

Permalink
Merge branch 'release/0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Oct 15, 2014
2 parents 90ec339 + a83d7d2 commit 2158d51
Show file tree
Hide file tree
Showing 51 changed files with 204 additions and 184 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
@@ -1,11 +1,15 @@
# Recoil Changelog

### 0.2.1 (2014-10-16)

* **[IMPROVED]** Added support for cancellable promises

### 0.2.0 (2014-09-23)

To faciliate several performance improvements the following backwards compatibility breaking changes have been introduced:

* **[BC]** `CoroutineInterface` no longer implements `EventEmitterInterface` - several unused events were fired every time a co-routine was called
* **[BC]** `Recoil::finalize()` now only works with generated based co-routines - this was previously implemented using the aforementioned events
* **[BC]** `CoroutineInterface` no longer implements `EventEmitterInterface` - several unused events were fired every time a coroutine was called
* **[BC]** `Recoil::finalize()` now only works with generated based coroutines - this was previously implemented using the aforementioned events

### 0.1.0 (2014-02-04)

Expand Down
20 changes: 12 additions & 8 deletions README.md
Expand Up @@ -47,7 +47,7 @@ Recoil::run(

yield $redisClient->connect();

// Yielding an array of co-routines executes them concurrently.
// Yielding an array of coroutines executes them concurrently.
yield [
resolveAndStore($redisClient, $dnsResolver, 'recoil.io'),
resolveAndStore($redisClient, $dnsResolver, 'reactphp.org'),
Expand Down Expand Up @@ -176,7 +176,7 @@ Recoil::run(
### Returning a value from a coroutine

Because PHP's `return` keyword can not be used to return a value inside a generator, the kernel API provides
`Recoil::return_()` to send a value to the calling coroutine. Just like `return` execution of the coroutine stops when a
`Recoil::return_()` to send a value to the calling coroutine. Just like `return`, execution of the coroutine stops when a
value is returned.

```php
Expand Down Expand Up @@ -246,11 +246,8 @@ adapted into a [PromiseCoroutine](src/Coroutine/PromiseCoroutine.php) instance a
the promise has been fulfilled.

If the promise is resolved, the resulting value is returned from the yield statement. If it is rejected, the yield
statement throws an exception describing the error. **Recoil** does not yet support progress events.

React promises are based on the [Promise/A+](https://github.com/promises-aplus/promises-spec) specification, which does
not yet define a mechanism for cancellation of pending promises. As such, terminating a coroutine that is waiting on a
promise simply causes the promise resolution to be ignored.
statement throws an exception describing the error. If a strand is waiting on the resolution of a cancellable promise,
and execution of that strand is terminated the promise is cancelled. **Recoil** does not yet support progress events.

The [promise-dns example](examples/promise-dns) demonstrates using the [React DNS component](https://github.com/reactphp/dns),
a promised-based API, to resolve several domain names concurrently. [This example](examples/promise-dns-react) shows the
Expand Down Expand Up @@ -298,7 +295,14 @@ $kernel->execute($coroutine());

$eventLoop->run();
```

## Contact us

* Follow [@IcecaveStudios](https://twitter.com/IcecaveStudios) on Twitter
* Visit the [Icecave Studios website](http://icecave.com.au)
* Join `#icecave` on [irc.freenode.net](http://webchat.freenode.net?channels=icecave)

<!-- references -->
[Build Status]: http://img.shields.io/travis/recoilphp/recoil/develop.svg?style=flat-square
[Test Coverage]: http://img.shields.io/coveralls/recoilphp/recoil/develop.svg?style=flat-square
[SemVer]: http://img.shields.io/:semver-0.2.0-yellow.svg?style=flat-square
[SemVer]: http://img.shields.io/:semver-0.2.1-yellow.svg?style=flat-square
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -26,7 +26,8 @@
"php": ">=5.5",
"evenement/evenement": "~2",
"icecave/repr": "~1",
"react/react": "0.4.0|~0.4.2"
"react/react": "0.4.0|~0.4.2",
"react/promise": "~2"
},
"require-dev": {
"icecave/archer": "~1",
Expand Down
114 changes: 56 additions & 58 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2158d51

Please sign in to comment.