note 16133 added to function.flock

From: Date: Wed, 17 Oct 2001 13:20:53 +0000
Subject: note 16133 added to function.flock
Groups: php.notes 
Request: Send a blank email to php-notes+get-19040@lists.php.net to get a copy of this message
Planning to create a FLASH/PHP multi-user-game. Imagine the following: Player A drops an item on the game map, which should cause writemap.php to start and write a certain info into map.txt. If (nearly) simultaneously a Player B drops an item, too, and causes writemap.php to start (...), would flocking really arrange the write requests so that the second player's request is applied right after the first player's request is done (and after the flock has been released)? Or will there be a delay of some time in between? Is there a way to manipulate that delay or is PHP smart enough to work through all waiting requests as fast as possible? How many such requests can PHP handle? Will any requests be dropped completely? Either way, I guess since I am working on Win98 I'll have the same problems as described above. But would it work when I upload all the data to my webspace which is hosted on a linux server? Someone please send a detailed and commented script to me - I am PHP newbie with big plans in my head ;-) Kryz -- http://www.php.net/manual/en/function.flock.php http://master.php.net/manage/user-notes.php?action=edit+16133 http://master.php.net/manage/user-notes.php?action=delete+16133 http://master.php.net/manage/user-notes.php?action=reject+16133

« previous php.notes (#19040) next »