concurrency - Can I use a dummy lock file for PHP to implement mutual exclusion? -
i wondering whether way implement mutual exclusion on php: use php flock() , dummy lock file.
because flock() allows 1 process access file.
$file = fopen("dummylockfile"); flock($file, lock_ex) //critical section fflock($file, lock_un) fclose($file)
Comments
Post a Comment