/// <summary> /// /// </summary> /// <param name="numProcessed"></param> /// <param name="client"></param> /// <returns></returns> public bool PopAndUnlock(int numProcessed, IRedisClient client) { if (numProcessed < 0) { numProcessed = 0; } if (numProcessed > numberOfDequeuedItems) { numProcessed = numberOfDequeuedItems; } //remove items from queue workQueue.Pop(workItemId, numProcessed); // unlock work queue id workQueue.Unlock(workItemId); return(myLock.Unlock(dequeueLockKey, lockExpire, client)); }
/// <summary> /// /// </summary> /// <param name="numProcessed"></param> /// <returns></returns> public bool PopAndUnlock(int numProcessed) { if (numProcessed < 0) { numProcessed = 0; } if (numProcessed > numberOfDequeuedItems) { numProcessed = numberOfDequeuedItems; } //remove items from queue workQueue.Pop(workItemId, numProcessed); // unlock work queue id workQueue.Unlock(workItemId); bool rc = base.Unlock(); ReleaseClient(); return(rc); }