xref: /php-uv/tests/701-uv_mutex.phpt (revision bcdd3a21)
1--TEST--
2Check for uv_rwlock
3--FILE--
4<?php
5$lock = uv_mutex_init();
6
7if (uv_mutex_trylock($lock)) {
8    echo "OK" . PHP_EOL;
9} else {
10    echo "FAILED" . PHP_EOL;
11}
12
13uv_mutex_unlock($lock);
14if (uv_mutex_trylock($lock)) {
15    echo "OK" . PHP_EOL;
16} else {
17    echo "FAILED" . PHP_EOL;
18}
19
20uv_mutex_unlock($lock);
21--EXPECT--
22OK
23OK