@Override
    public void run() {
        try {
            while (true) {
                freeWorkerMap.setBit(index);
                synchronized (lock) {
                    while (in == null) {
                        logger.debug("{} in is null. sleep.", index);
                        lock.wait();
                    }
                }
                freeWorkerMap.clearBit(index);
                window.insert(in.id, processor.process(in.input));
                in = null;
            }
        } catch (InterruptedException e) {
            logger.info("interrupted");
        } catch (Throwable e) {
            logger.error("interrupted", e);
        }
    }