public synchronized void run() {
        while (true) {
            if(channel == null) {
                try {
                    wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            try {
                handleRequest();
            } catch (IOException e) {
                e.printStackTrace();
            }
            finally {
                channel = null;
                pool.addWorker(this);
            }
        }
    }