[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/includes/ -> lock.inc (summary)

(no description)

File Size: 229 lines (8 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 7 functions

  lock_init()
  _lock_id()
  lock_acquire()
  lock_may_be_available()
  lock_wait()
  lock_release()
  lock_release_all()

Functions
Functions that are not part of a class:

lock_init()   X-Ref
Initialize the locking system.


_lock_id()   X-Ref
Helper function to get this request's unique id.


lock_acquire($name, $timeout = 30.0)   X-Ref
Acquire (or renew) a lock, but do not block if it fails.

param: $name
param: $timeout
return:

lock_may_be_available($name)   X-Ref
Check if lock acquired by a different process may be available.

If an existing lock has expired, it is removed.

param: $name
return:

lock_wait($name, $delay = 30)   X-Ref
Wait for a lock to be available.

This function may be called in a request that fails to acquire a desired
lock. This will block further execution until the lock is available or the
specified delay in seconds is reached.  This should not be used with locks
that are acquired very frequently, since the lock is likely to be acquired
again by a different request during the sleep().

param: $name
param: $delay
return:

lock_release($name)   X-Ref
Release a lock previously acquired by lock_acquire().

This will release the named lock if it is still held by the current request.

param: $name

lock_release_all($lock_id = NULL)   X-Ref
Release all previously acquired locks.




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