WIP: uv_queue_work

This commit is contained in:
Shuhei Tanuma 2012-07-07 22:57:42 +09:00
parent 0bc6c44146
commit 4e4f9dc0ab
2 changed files with 21 additions and 7 deletions

View File

@ -1,14 +1,11 @@
<?php <?php
$loop = uv_default_loop(); $loop = uv_default_loop();
$a = function(){ $queue = uv_queue_work($loop, function(){
var_dump("[queue]"); echo "[queue]";
}; }, function(){
$b = function(){
echo "[finished]"; echo "[finished]";
}; });
$queue = uv_queue_work($loop, $a, $b);
uv_run(); uv_run();

View File

@ -0,0 +1,17 @@
--TEST--
Check for uv_queue_work
--FILE--
<?php
$loop = uv_default_loop();
$a = function(){
echo "[queue]";
};
$b = function(){
echo "[finished]";
};
$queue = uv_queue_work($loop, $a, $b);
uv_run();
--EXPECT--
[finished][queue]