symfony/symfony — pull request #3607 by arnapou (2012-03-15 18:46:19+00:00)
Title: Correct bad HttpCache behaviour when waiting for unlock.

I read the class Symfony\Component\HttpKernel\HttpCache\HttpCache and I found something which looks like a bug lines 518-520 (in *lock* method) :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep($wait += 50000);
}
This code can wait at maximum 50000+100000+150000+.... 4950000 µs = more than 250 seconds !

I corrected like that :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep(50000);
$wait += 50000
}

This code will wait 5 sec maximum.

This is more coherent if we read the following lines of this method.