ftok

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Convert a pathname and a project identifier to a System V IPC key int ftok ( string $pathname, string $proj ) The function converts the pathname of an existing accessible file and a project identifier into an integer for use with for example shmop_open() and other System V IPC keys. Parameters: pathname Path to an accessible file.

Cond::wait

(PECL pthreads >= 2.0.0) Wait for Condition final public static boolean Cond::wait ( long $condition , long $mutex [, long $timeout ] ) Wait for a signal on a Condition Variable, optionally specifying a timeout to limit waiting time. Parameters: condition A handle returned by a previous call to Cond::create(). mutex A handle returned

Cond::signal

(PECL pthreads >= 2.0.0) Signal a Condition final public static boolean Cond::signal ( long $condition ) Parameters: condition A handle returned by a previous call to Cond::create() Returns: A boolean indication of success. Examples: Condition Signalling <?php /** You 

Cond::destroy

(PECL pthreads >= 2.0.0) Destroy a Condition final public static boolean Cond::destroy ( long $condition ) Destroying Condition Variable handles must be carried out explicitly by the programmer when they are finished with the Condition Variable. No Threads should be blocking on a call to Cond::wait() when the call to Cond::destroy() takes place. Parameters: condition

Cond::create

(PECL pthreads >= 2.0.0) Create a Condition final public static long Cond::create ( void ) Creates a new Condition Variable for the caller. Returns: A handle to a Condition Variable Examples: Condition Creation and Destruction <?php /** You cannot use the "new" keyword, a Cond is not a PHP object **/ $cond = Cond::crea

Cond::broadcast

(PECL pthreads >= 2.0.0) Broadcast a Condition final public static boolean Cond::broadcast ( long $condition ) Broadcast to all Threads blocking on a call to Cond::wait(). Parameters: condition A handle to a Condition Variable returned by a previous call to Cond::create() Returns: A boolean indication of success.

Mutex::unlock

(PECL pthreads >= 2.0.0) Release Mutex final public static boolean Mutex::unlock ( long $mutex [, boolean $destroy ] ) Attempts to unlock the Mutex for the caller, optionally destroying the Mutex handle. The calling thread should own the Mutex at the time of the call. Parameters: mutex A handle returned by a previous call to Mutex::create(). des

Mutex::trylock

(PECL pthreads >= 2.0.0) Attempt to Acquire Mutex final public static boolean Mutex::trylock ( long $mutex ) Attempt to lock the Mutex for the caller without blocking if the Mutex is owned (locked) by another Thread. Parameters: mutex A handle returned by a previous call to Mutex::create(). Returns: A boolean indication of success.

Mutex::lock

(PECL pthreads >= 2.0.0) Acquire Mutex final public static boolean Mutex::lock ( long $mutex ) Attempt to lock the Mutex for the caller. An attempt to lock a Mutex owned (locked) by another Thread will result in blocking. Parameters: mutex A handle returned by a previous call to Mutex::create(). Returns: A boolean indication of success.

Mutex::destroy

(PECL pthreads >= 2.0.0) Destroy Mutex final public static boolean Mutex::destroy ( long $mutex ) Destroying Mutex handles must be carried out explicitly by the programmer when they are finished with the Mutex handle. Parameters: mutex A handle returned by a previous call to Mutex::create(). The handle should not be locked by any Thread when Mutex::destroy() is called