LJ::may_lock

LJ::may_lock — see if we could get a MySQL lock on a given key/dbrole combination, but don't actually get it.

Use

LJ::may_lock(db, dbrole);

Arguments

  • db. 

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

Source:

cgi-bin/ljdb.pl

Returns:

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