public void releaseInterruptibly(final Object o, final long timeout,
                                     final TimeUnit unit) throws InterruptedException {
        if (Objects.isNull(o)) {
            return;
        }
        long nanos = unit.toNanos(timeout);
        releaseLock.lockInterruptibly();
        try {
            final long objectSize = inst.getObjectSize(o);
            while (memory.sum() == 0) {
                if (nanos <= 0) {
                    return;
                }
                nanos = notEmpty.awaitNanos(nanos);
            }
            memory.add(-objectSize);
            if (memory.sum() > 0) {
                notEmpty.signal();
            }
        } finally {
            releaseLock.unlock();
        }
        if (memory.sum() < memoryLimit) {
            signalNotLimited();
        }
    }
release memory by {@link Object}.
this method response to interrupts.

@param o       memory size to be applied by calculating
@param timeout max time to wait
@param unit    time unit
@throws InterruptedException the InterruptedException
shenyu-common/src/main/java/org/apache/shenyu/common/concurrent/MemoryLimiter.java