mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
WIP: uv_queue_work
This commit is contained in:
parent
0bc6c44146
commit
4e4f9dc0ab
@ -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();
|
||||||
|
17
tests/800-uv_queue_work.phpt
Normal file
17
tests/800-uv_queue_work.phpt
Normal 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]
|
Loading…
Reference in New Issue
Block a user