[Phpfreechat-svn] SF.net SVN: phpfreechat: [1083] branches/pfc-comet/misc/flock-tests/ readwrite2.p
Status: Beta
Brought to you by:
kerphi
From: <gpi...@us...> - 2007-08-04 17:33:24
|
Revision: 1083 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1083&view=rev Author: gpinzone Date: 2007-08-04 10:33:26 -0700 (Sat, 04 Aug 2007) Log Message: ----------- Implemented (2^n - 1) * delay exponential back-off for flock failure. Modified Paths: -------------- branches/pfc-comet/misc/flock-tests/readwrite2.php Modified: branches/pfc-comet/misc/flock-tests/readwrite2.php =================================================================== --- branches/pfc-comet/misc/flock-tests/readwrite2.php 2007-08-04 12:57:44 UTC (rev 1082) +++ branches/pfc-comet/misc/flock-tests/readwrite2.php 2007-08-04 17:33:26 UTC (rev 1083) @@ -31,7 +31,8 @@ break; } // If flock is working properly, this will never be reached - usleep(rand(1000,5000)); // TODO: implement exponential backoff + $delay = (pow (2, ($i+1)) - 1) * rand(0,5000); // Exponential backoff + usleep($delay); } fclose($fh); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |