xref: /php-uv/tests/800-uv_queue_work.phpt (revision 37deaf71)
1--TEST--
2Check for uv_queue_work
3--SKIPIF--
4<?php
5ob_start();
6phpinfo();
7$data = ob_get_clean();
8if (!preg_match("/Thread Safety.+?enabled/", $data) || PHP_VERSION_ID >= 80000) {
9  echo "skip";
10}
11--FILE--
12<?php
13$loop = uv_default_loop();
14
15$a = function() {
16    echo "[queue]";
17};
18
19$b = function() {
20    echo "[finished]";
21};
22$queue = uv_queue_work($loop, $a, $b);
23uv_run();
24--EXPECT--
25[queue][finished]
26