array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.eio-event-loop.php', 1 => 'eio_event_loop', ), 'up' => array ( 0 => 'ref.eio.php', 1 => 'Eio Functions', ), 'prev' => array ( 0 => 'function.eio-dup2.php', 1 => 'eio_dup2', ), 'next' => array ( 0 => 'function.eio-fallocate.php', 1 => 'eio_fallocate', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/eio/functions/eio-event-loop.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL eio >= 0.0.1dev)
eio_event_loop — Polls libeio until all requests proceeded
This function has no parameters.
Example #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();
?>
The above example will output something similar to:
eio_chmod_ok