mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
23 lines
341 B
Plaintext
23 lines
341 B
Plaintext
|
--TEST--
|
||
|
Check for uv_rwlock
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$lock = uv_rwlock_init();
|
||
|
|
||
|
if (uv_rwlock_trywrlock($lock)) {
|
||
|
echo "OK" . PHP_EOL;
|
||
|
} else {
|
||
|
echo "FAILED" . PHP_EOL;
|
||
|
}
|
||
|
|
||
|
uv_rwlock_wrunlock($lock);
|
||
|
if (uv_rwlock_trywrlock($lock)) {
|
||
|
echo "OK" . PHP_EOL;
|
||
|
} else {
|
||
|
echo "FAILED" . PHP_EOL;
|
||
|
}
|
||
|
|
||
|
uv_rwlock_wrunlock($lock);
|
||
|
--EXPECT--
|
||
|
OK
|
||
|
OK
|