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:
parent
b5770ba64a
commit
c29da96f3e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user