From c29da96f3efdc30719e38a7002277f324581ec18 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Tue, 2 May 2017 07:25:22 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20remaining=20Pause=20=E2=86=92=20Delayed?= =?UTF-8?q?=20in=20examples=20and=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/managing-concurrency.md | 2 +- examples/iterators/backpressure.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/managing-concurrency.md b/docs/managing-concurrency.md index 2f25376..e30fb01 100644 --- a/docs/managing-concurrency.md +++ b/docs/managing-concurrency.md @@ -29,7 +29,7 @@ The addition of generators in PHP 5.5 trivializes synchronization and error hand use Amp\Loop; function asyncMultiply($x, $y) { - yield new Amp\Pause($millisecondsToPause = 100); + yield new Amp\Delayed($millisecondsToPause = 100); return $x * $y; } diff --git a/examples/iterators/backpressure.php b/examples/iterators/backpressure.php index b3be8a1..c113488 100644 --- a/examples/iterators/backpressure.php +++ b/examples/iterators/backpressure.php @@ -32,7 +32,7 @@ Loop::run(function () { while (yield $iterator->advance()) { printf("Emitter emitted %d\n", $iterator->getCurrent()); - yield new Pause(500); // Listener consumption takes 500 ms. + yield new Delayed(500); // Listener consumption takes 500 ms. } } catch (\Exception $exception) { printf("Exception: %s\n", $exception);