ext-uv/tests/100-uv_check.phpt

27 lines
389 B
Plaintext
Raw Normal View History

--TEST--
2020-02-15 12:02:30 +01:00
Check for uv_check
--FILE--
<?php
$loop = uv_default_loop();
$check = uv_check_init($loop);
$idle = uv_idle_init();
$i = 0;
uv_idle_start($idle, function($stat) use (&$i, $idle, $loop){
$i++;
if ($i > 3) {
uv_idle_stop($idle);
}
});
2015-01-18 02:58:40 +01:00
uv_check_start($check, function($check) {
echo "Hello";
uv_check_stop($check);
});
uv_run();
--EXPECT--
Hello