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