public boolean getTokens(int numTokens) {
		int capacityAfter = capacity.addAndGet(-numTokens);
		if (capacityAfter < 0) {
			// Optimistically claimed more tokens than were actually available - give them back, so the next thread can try:
			capacity.addAndGet(numTokens);
			return false;
		}
		return true;
	}