Some sort of portable advisory file locking API would be useful to me. Perhaps like http://www.php.net/manual/en/function.flock.php. I can look into sending a pull request if there are no objections.