@Override
	public final void run() {
		while (true) {
			synchronized (lock) {
				if (!running) {
					break;
				}
			}
			
			ChannelRequest<T> request;
			try {
				request = nextRequest();
			} catch (InterruptedException e) {
				continue;
			}
			
			Channel channel = request.getChannel();
			
			try {
				service(provider, channel, request.getRequest());
			} catch (IOException e) {
				e.printStackTrace();
				channel.close();
			}
		}
	}