@Override
    public void run() {
        while (true) {
            if (in == null || out != null) {
                if (Thread.interrupted()) {
                    logger.info("interruption request. break cycle.");
                    break;
                }
//                Thread.yield();
            } else {
                try {
                    out = new Job(processor.process(in.input), in.id);
                } catch (Throwable e) {
                    logger.error("lost job id {}", in.id, e);
                }
                in = null;
            }
        }
    }