package com.twm.tools.local

import java.util.concurrent.Callable
import java.util.concurrent.Semaphore

class QPSTaskWrapper<V>(
    private val semaphore: Semaphore,
    private val delegate: Callable<V>
): Callable<V> {

    override fun call(): V {
        semaphore.acquireUninterruptibly(1)
        return delegate.call()
    }

}