Polls libeio until all requests proceeded

eio_event_loop

(PECL eio >= 0.0.1dev)

eio_event_loopPolls libeio until all requests proceeded

說明

eio_event_loop(): bool

eio_event_loop() polls libeio until all requests proceeded.

參數

此函式沒有參數。

返回值

eio_event_loop() returns true on success, 或者在失敗時返回 false.

範例

示例 #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 == && !is_readable($temp_filename) && is_writable($temp_filename)) {
        echo 
"eio_chmod_ok";
    }

    @
unlink($temp_filename);
}

eio_chmod($temp_filename0200EIO_PRI_DEFAULT"my_chmod_callback");
eio_event_loop();
?>

以上例程的輸出類似於:

eio_chmod_ok
 

參見

  • eio_poll() - Can be to be called whenever there are pending requests that need finishing

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *