system
简介
进程控制扩展
PHP Manual
pthreads
简介
安装/配置
需求
安装
运行时配置
资源类型
预定义常量
范例
Thread
— The Thread class
Thread::getCount
— Return the number of currently executing Threads.
Thread::getMax
— Return the maximum number of Threads an instance of PHP may create.
Thread::getPeak
— Return the peak number of Threads.
Thread::getStacked
— Return the number of items on the referenced Threads stack.
Thread::getThread
— Import a Thread created in another context.
Thread::getThreadId
— Get the identifer for a Thread
Thread::isBusy
— Tell if a Thread is busy executing
Thread::isJoined
— Tell if the referenced Thread has been joined.
Thread::isRunning
— Tell if the referenced Thread is running.
Thread::isStarted
— Tell if the referenced Thread has been started.
Thread::isWaiting
— Tell if the referenced Thread is waiting.
Thread::join
— Join with the referenced Thread.
Thread::notify
— Notify all Threads waiting for the referenced Thread.
Thread::run
— This is the method that pthreads runs asynchronously for the programmer.
Thread::stack
— Push work onto the stack for execution by the referenced Thread
Thread::start
— Start executing the referenced Thread
Thread::unstack
— Remove items from the referenced Threads stack.
Thread::wait
— Wait for Notification from the referenced Thread.
Mutex
— The Mutex class
Mutex::create
— Create a new Mutex
Mutex::destroy
— To destroy a handle to a Mutex and free the associated resources
Mutex::lock
— The lock purpose
Mutex::trylock
— To attempt to lock a Mutex without blocking.
Mutex::unlock
— Attempts to unlock a Mutex
Cond
— The Cond class
Cond::broadcast
— Broadcast a condition to all Threads
Cond::create
— Create a new Condition Variable
Cond::destroy
— Destroy a handle to a Condition Variable and free the associated resources
Cond::signal
— Signal a condition to a single Thread
Cond::wait
— Wait for a signal on a Condition Variable
system
简介
进程控制扩展
PHP Manual