- private function give(PromiseInterface $promise, Generator $to) {
- $promise->then(function($result) use($to) {
- if (($promise = $to->send($result))) {
- $this->queue($promise, $to);
- }
- });
- }
-
- private function queue($promise, Generator $gen) {