anchor.diff:  
   	///Returns the number of items successfully added to the user's inventory
   	static Future<int> addItemToUser(String email, Map item, int count,	[String fromObject = "_self"]) async {
  -		await _aquireLock(email);
  +		if (!(await _aquireLock(email))) {
  +			return 0;
  +		}
  +
   		WebSocket userSocket = StreetUpdateHandler.userSockets[email];
   		InventoryV2 inv = await getInventory(email);
   		int added = await inv._addItem(item, count, email);
   		await fireInventoryAtUser(userSocket, email, update: true);
  -		if(added > 0) {
  +		if (added > 0) {
   			String itemType = item['itemType'];
   			messageBus.publish(new RequirementProgress('getItem_$itemType', email, count: count));
  -			if(itemType == 'pick' || itemType == 'fancy_pick') {
  +			if (itemType == 'pick' || itemType == 'fancy_pick') {
   				QuestEndpoint.questLogCache[email]?.offerQuest('Q6');
   			}
   		}
  
positive.code: 	}
  
  	static Future<int> takeAnyItemsFromUser(String email, String itemType, int count, {simulate: false}) async {
  		await _aquireLock(email);
  		WebSocket userSocket = StreetUpdateHandler.userSockets[email];
  		InventoryV2 inv = await getInventory(email);
  		int taken = await inv._takeAnyItems(itemType, count, email, simulate: simulate);
  
negative.code: 		return c.future;
  	}
  
  	static Future<bool> _aquireLock(String email) async {
  		int numTriesLeft = 100; //we'll throw an error after 5 seconds of trying
  		if (inventoryLocked[email] != null) {
  			while (inventoryLocked[email] && numTriesLeft > 0) {
  				await _wait(new Duration(milliseconds: 50));
  				numTriesLeft--;
  			}
  			if (inventoryLocked[email]) {
  				Log.warn("Could not acquire a lock for inventory of <email=$email>");
  				return false;
  			}
  		}
  
  		inventoryLocked[email] = true;
  		return true;
  	}
  
  	static void _releaseLock(String email) {
  