Voting

: three plus six?
(Example: nine)

The Note You're Voting On

Sander Backus
11 years ago
Note that when you reset $sem_identifier the semaphore won't block anymore!

This code does NOT work:
$key = ftok(__FILE__,'m');
$a = sem_get($key);
sem_acquire($a);
$a = false;

while this one does:

$key = ftok(__FILE__,'m');
$a = sem_get($key);
sem_acquire($a);
//$a = false;

So: use unique var names for your identifier!

<< Back to user notes page

To Top