I have some files that I need to update atomically without interruptions. Is there some way to have critical sections in PHP, to avoid another script thread from running?
Thanks,
-Ray
Critical Sections?
Moderator: General Moderators
nope, each script running should be seen as one process on its own, so only semaphores would help.
Though there is support for semaphores if it's only about file access take a look at php.net/flock
Though there is support for semaphores if it's only about file access take a look at php.net/flock