? Pool::submitTo
Mutex::create ?
PHP Manual
pthreads
Mutex 类
Mutex 类
(PECL pthreads >= 2.0.0)
简介
Mutex 类中包含一些直接访问 Posix 互斥量的静态方法
类摘要
Mutex
{
/* 方法 */
final
public
static
long
create
([
boolean
$lock
] )
final
public
static
boolean
destroy
(
long
$mutex
)
final
public
static
boolean
lock
(
long
$mutex
)
final
public
static
boolean
trylock
(
long
$mutex
)
final
public
static
boolean
unlock
(
long
$mutex
[,
boolean
$destroy
] )
}
Table of Contents
Mutex::create
— 创建一个互斥量
Mutex::destroy
— 销毁互斥量
Mutex::lock
— 给互斥量加锁
Mutex::trylock
— 尝试给互斥量加锁
Mutex::unlock
— 释放互斥量上的锁