I have looked at the code of the  thrift(c++) ,then i have a doubt about the 
"class TNonblockingServer::TConnection::Task",‍‍‍‍
TNonblockingServer‍ received a complete package will create a task to work 
thread processing,‍
I think the work thread just need process once for the package,so I doubt about 
the code:


      for (;;) {
        if (serverEventHandler_) {
          serverEventHandler_->processContext(connectionContext_, 
connection_->getTSocket());
        }
        if (!processor_->process(input_, output_, connectionContext_) ||
            !input_->getTransport()->peek()) {
          break;
        }
      }‍



why use the "for(;;)", just need run once, Could you help me solve this doubt 
it for me? ‍
Thank you very much!

Reply via email to