/** * @param throttleLimit the maximum number of results that can be expected * at any given time. */ public ResultHolderResultQueue(int throttleLimit) { results = new PriorityBlockingQueue<>(throttleLimit, new ResultHolderComparator()); waits = new Semaphore(throttleLimit); }
/** * @param throttleLimit the maximum number of results that can be expected * at any given time. */ public ResultHolderResultQueue(int throttleLimit) { results = new PriorityBlockingQueue<ResultHolder>(throttleLimit, new ResultHolderComparator()); waits = new Semaphore(throttleLimit); }