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

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -