$loop->addTimer(0.1, function () use ($loop) {
$loop->stop();
});
function fooBar($loop) {
return function () use ($loop) {
echo 'a';
$loop->futureTick(fooBar($loop));
};
}
$loop->futureTick(fooBar($loop));
$loop->run();
$loop->addTimer(0.1, function () use ($loop) {
$loop->stop();
});
function fooBar($loop) {
return function () use ($loop) {
echo 'a';
$loop->nextTick(fooBar($loop));
};
}
$loop->nextTick(fooBar($loop));
$loop->run();