If you look at the code for variable_init() used by Pressflow, you will notice the following:
This behavior is not present in the function used by Drupal 6, where variable_init() doesn't use any lock.
Similar code is used from Drupal 7, even though there is a slight difference: Drupal 7 reads the values of the Drupal variables from the database, while Pressflow doesn't do that. Compare the following snippets; the first one is used in Drupal 7, while the second one is used in Pressflow 6.
// Cache miss. Avoid a stampede.
$name = 'variable_init';
if (!lock_acquire($name, 1)) {
// Another request is building the variable cache.
// Wait, then re-run this function.
lock_wait($name);
return variable_initialize($conf);
}
else {
// Proceed with variable rebuild.
$variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());
cache_set('variables', $variables, 'cache_bootstrap');
lock_release($name);
// Wait for another request that is already doing this work.
lock_wait('variable_cache_regenerate');
// Run the function again. Try a limited number of times to avoid
// infinite recursion if the database connection is invalid for
// some reason, e.g., mysqld restart, loss of network, etc.
$recursion_depth++;
if ($recursion_depth < 50) {
return variable_init($conf, $regenerate, $recursion_depth);
}
$variables = array();