public static JSONArray nextSync(long uid) {
		UserNotificationBuffer monitor = getMonitorFor(uid);
		synchronized(monitor) {
			if(monitor.isEmpty()) {
				try
				{
					monitor.wait(COMET_TIMEOUT);
				} catch (InterruptedException e)
				{
					e.printStackTrace();
				}
			}
			return monitor.packJson();
		}
	}