load (   $id)

Load object and acquires lock.

351  {
352  $lockname = $this->table . ' ' . $id;
353  $times = 0;
354  while (!lock_acquire($lockname)) {
355  $times++;
356  if ($times > 5) {
357  throw new Exception(t('Impossible to get the database lock %lock', array('%lock' => $lockname)));
358  }
359  lock_wait($lockname);
360  }
361  return parent::load($id);
362  }