void (@NotNull final T t) { synchronized (myLock) { for (Iterator<Pair<Long, T>> iterator = myQueue.iterator(); iterator.hasNext();) { final Pair<Long, T> pair = iterator.next(); if (t.equals(pair.getSecond())) { iterator.remove(); } } myInProgress.remove(t); } }