On Tue, 8 May 2007, Stanislav Malyshev wrote: > > If we're to add this, make sure writes to the files are atomic. > > Does PHP now ensure fwrite is atomic? If it doesn't than writing on serialize > doesn't change a thing.
Only "a" mode is atomic - per write call; normal fwrites are not. However, you'd need to write the *whole* file to disk atomically and not on every fwrite. And you can not first cache it in memory as you then lose the whole advantage of this idea. regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php