1
0
mirror of https://github.com/danog/amp.git synced 2025-01-22 05:11:42 +01:00

Fix remaining Pause → Delayed in examples and docs

This commit is contained in:
Niklas Keller 2017-05-02 07:25:22 +02:00
parent b5770ba64a
commit c29da96f3e
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);