2012-06-30 07:10:58 +02:00
|
|
|
--TEST--
|
|
|
|
Check for uv_rwlock
|
2016-11-01 16:31:54 +01:00
|
|
|
--INI--
|
|
|
|
track_errors=0
|
2012-06-30 07:10:58 +02:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$lock = uv_rwlock_init();
|
|
|
|
|
|
|
|
uv_rwlock_rdlock($lock);
|
|
|
|
if (uv_rwlock_tryrdlock($lock)) {
|
|
|
|
echo "OK" . PHP_EOL;
|
|
|
|
} else {
|
|
|
|
echo "FAILED" . PHP_EOL;
|
|
|
|
}
|
|
|
|
uv_rwlock_rdunlock($lock);
|
|
|
|
if (uv_rwlock_tryrdlock($lock)) {
|
|
|
|
echo "OK" . PHP_EOL;
|
|
|
|
} else {
|
|
|
|
echo "FAILED" . PHP_EOL;
|
|
|
|
}
|
|
|
|
|
|
|
|
uv_rwlock_rdunlock($lock);
|
|
|
|
--EXPECT--
|
|
|
|
OK
|
2016-11-01 16:31:54 +01:00
|
|
|
OK
|
|
|
|
|
|
|
|
Notice: Unknown: uv_rwlock: still locked resource detected; forcing rdunlock in Unknown on line 0
|