sem_release

bool sem_release(int id) 

Releases the semaphore with the given ID.

Returns:

TRUE on success; FALSE on failure

Description:

sem_release() releases the semaphore with the ID specified by id , which must be a valid semaphore ID as returned by sem_get(). Once released, a semaphore can no longer be used by the script; however, a new semaphore ID with the same key can be acquired and used.

Version:

PHP 3 since 3.0.6, PHP 4

See also:

sem_acquire() 
sem_get() 

Example:

Release a semaphore
sem_release($sem_id); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.