[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/includes/ -> lock-install.inc (source)

   1  <?php
   2  
   3  /**
   4   * @file
   5   * A stub lock implementation to be used during the installation
   6   * process when database access is not yet available. Because Drupal's
   7   * install system should never be running in more than on concurrant
   8   * request, we can bypass any need for locking.
   9   */
  10  
  11  /**
  12   * Initialize the locking system.
  13   */
  14  function lock_init() {
  15  }
  16  
  17  /**
  18   * Acquire (or renew) a lock, but do not block if it fails.
  19   *
  20   * @return
  21   *   TRUE if the lock was acquired, FALSE if it failed.
  22   */
  23  function lock_acquire($name, $timeout = 30.0) {
  24    return TRUE;
  25  }
  26  
  27  /**
  28   * Check if lock acquired by a different process may be available.
  29   *
  30   * @return
  31   *   TRUE if there is no lock or it was removed, FALSE otherwise.
  32   */
  33  function lock_may_be_available($name) {
  34    return TRUE;
  35  }
  36  
  37  /**
  38   * Wait for a lock to be available.
  39   *
  40   * @return
  41   *   TRUE if the lock holds, FALSE if it is available.
  42   */
  43  function lock_wait($name, $delay = 30) {
  44    return FALSE;
  45  }
  46  
  47  /**
  48   * Release a lock previously acquired by lock_acquire().
  49   *
  50   * This will release the named lock if it is still held by the current request.
  51   *
  52   * @param $name
  53   *   The name of the lock.
  54   */
  55  function lock_release($name) {
  56  }
  57  
  58  /**
  59   * Release all previously acquired locks.
  60   */
  61  function lock_release_all($lock_id = NULL) {
  62  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7