September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool sem_acquire(int id) Acquires the semaphore identified by id.
Returns:
TRUE on success; FALSE on failure
Description:
sem_acquire() attempts to acquire the semaphore identified by id , and blocks until it can do so. Remember that a semaphore can be simultaneously acquired only as many times as specified in the max_acquire parameter to sem_get(); if this limit has been reached, sem_acquire blocks until the semaphore is released. id must be a valid semaphore identifier as returned by sem_get().
Version:
PHP 3 since 3.0.6, PHP 4
See also:
sem_get() sem_release()
Example:
/* To test this script, create two browser windows and load the * page containing this script in each of them simultaneously. ... |
Read now
Unlock full access