xref: /php-uv/tests/700-uv_rwlock.phpt (revision 30c34d72)
1--TEST--
2Check for uv_rwlock
3--INI--
4track_errors=0
5--FILE--
6<?php
7$lock = uv_rwlock_init();
8
9uv_rwlock_rdlock($lock);
10if (uv_rwlock_tryrdlock($lock)) {
11    echo "OK" . PHP_EOL;
12} else {
13    echo "FAILED" . PHP_EOL;
14}
15uv_rwlock_rdunlock($lock);
16if (uv_rwlock_tryrdlock($lock)) {
17    echo "OK" . PHP_EOL;
18} else {
19    echo "FAILED" . PHP_EOL;
20}
21
22uv_rwlock_rdunlock($lock);
23--EXPECT--
24OK
25OK
26
27Notice: Unknown: uv_rwlock: still locked resource detected; forcing rdunlock in Unknown on line 0
28