code: func (latches *Latches) acquire(lock *Lock) acquireResult {
  	if lock.IsStale() {
  		return acquireStale
  	}
  	for lock.acquiredCount < len(lock.requiredSlots) {
  		status := latches.acquireSlot(lock)
  		if status != acquireSuccess {
  			return status
  		}
  	}
  	return acquireSuccess
  }
docs: // acquire tries to acquire the lock for a transaction.