I need mutual exclusion for some operation. On my server I have APC installed.
Is there any approved Class to acquire and release a mutex ? I would avoid to reinvent the wheel if there is already an "official" solution.
Please note, I know I could use flock
, but I don't want to fall back to file system to acquire a mutex
Something like:
$m = new Mutex;
$m->lock();
//> Do stuff
$m->unlock();