I was wondering whether this is a good way to implement mutual exclusion on PHP: You use PHP flock() and a dummy lock file.
Because flock() only allows one process to access a file.
$file = fopen("dummyLockFile");
flock($file, LOCK_EX)
//Critical section
fflock($file, LOCK_UN)
fclose($file)