mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
Fixed NativeReactor example by making the reactor instance available in scope
This commit is contained in:
parent
916306533a
commit
2631403ecd
2
guide.md
2
guide.md
@ -144,7 +144,7 @@ $reactor->run(function($reactor) use (&$stdinWatcher, &$number) {
|
|||||||
$number = fgets(STDIN);
|
$number = fgets(STDIN);
|
||||||
$reactor->stop();
|
$reactor->stop();
|
||||||
});
|
});
|
||||||
$reactor->once(function() {
|
$reactor->once(function(Amp\Reactor $reactor) {
|
||||||
$reactor->stop();
|
$reactor->stop();
|
||||||
}, $msInterval = 5000);
|
}, $msInterval = 5000);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user