eio_event_loop
(PECL eio >= 0.0.1dev)
eio_event_loop — Polls libeio until all requests proceeded
参数
此函数没有参数。
示例
示例 #1 eio_event_loop() example
<?php
$temp_filename = "eio-temp-file.tmp";
touch($temp_filename);
/* Is called when eio_chmod() finished */
function my_chmod_callback($data, $result) {
global $temp_filename;
if ($result == 0 && !is_readable($temp_filename) && is_writable($temp_filename)) {
echo "eio_chmod_ok";
}
@unlink($temp_filename);
}
eio_chmod($temp_filename, 0200, EIO_PRI_DEFAULT, "my_chmod_callback");
eio_event_loop();
?>以上示例的输出类似于:
eio_chmod_ok
参见
- eio_poll() - Can be called whenever there are pending requests that need finishing
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
