mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-27 12:34:44 +01:00
20 lines
287 B
PHP
20 lines
287 B
PHP
|
<?php
|
||
|
$prepare = uv_prepare_init();
|
||
|
uv_prepare_start($prepare,function(){
|
||
|
|
||
|
|
||
|
$loop = uv_default_loop();
|
||
|
$a = function(){
|
||
|
var_dump("[queue]");
|
||
|
};
|
||
|
$b = function(){
|
||
|
echo "[finished]";
|
||
|
};
|
||
|
$queue = uv_queue_work($loop, $a, $b);
|
||
|
$queue2 = uv_queue_work($loop, $a, $b);
|
||
|
|
||
|
});
|
||
|
|
||
|
uv_run();
|
||
|
|