»

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/ljlib.pl

Returns:

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