mirror of
https://github.com/danog/ext-uv.git
synced 2024-12-02 09:27:58 +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();
|
|
|