I have a question regarding PHP flock() function:
How PHP flock() can prevent starvation of a process?
If there is a process R constantly wanting to read a file and a process W that wants to write in the file whenever reading is complete (wants an Exclusive Lock). How does it make process W not starve?
Is there a way to use flock() and make process W not starve in PHP?