LJ::get_lock

LJ::get_lock — get a MySQL lock on a given key/dbrole combination.

Use

LJ::get_lock(db, dbrole, lockname, wait_time);

Arguments

  • db. 

  • dbrole. the role this lock should be gotten on, either 'global' or 'user'.

  • lockname. the name to be used for this lock.

  • wait_time. an optional timeout argument, defaults to 10 seconds.

Source:

cgi-bin/ljdb.pl

Returns:

undef if called improperly, true on success, die() on failure