function lock(sLockName = DEFAULT_LOCK_NAME)
    {
        setup(sLockName);

        // if we’re already locking, fail
        if (oLockStore[sLockName] === true)
        {
            return false;
        }

        // otherwise lock
        console.debug(`[LOCK] locking ‘${sLockName}’`);
        oLockStore[sLockName] = true;
        return true;
    }
/**
     * Tries to get a lock with the given name.
     *
     * @param   {string}    sLockName - an optional lock name
     * @return  {boolean}   whether the attempt was successful
     */
Tries to get a lock with the given name.
@param   {string}    sLockName - an optional lock name
@return  {boolean}   whether the attempt was successful
Tries to get a lock with the given name . @param { string } sLockName - an optional lock name @return { boolean } whether the attempt was successful
function lock(sLockName = DEFAULT_LOCK_NAME)
    {
        setup(sLockName);
        if (oLockStore[sLockName] === true)
        {
            return false;
        }
        console.debug(`[LOCK] locking ‘${sLockName}’`);
        oLockStore[sLockName] = true;
        return true;
    }
function lock ( sLockName = DEFAULT_LOCK_NAME ) { setup ( sLockName ) ; if ( oLockStore [ sLockName ] === true ) { return false ; } console . debug ( ` sL ockName}’ ` oLockStore [ sLockName ] = true ; return true ; }
Tries to get a lock with the given name.
Tries to get a lock with the given name .
// if we’re already locking, fail // otherwise lock