class_docstr: Server with a fixed size pool of threads which service requests.
class_docstr_tok: ["Server","with","a","fixed","size","pool","of","threads","which","service","requests","."]
docstr: Start a fixed number of worker threads and put client into a queue
docstr_tok: ["Start","a","fixed","number","of","worker","threads","and","put","client","into","a","queue"]
code: def serve(self):
      """Start a fixed number of worker threads and put client into a queue"""
      for i in range(self.threads):
          try:
              t = threading.Thread(target=self.serveThread)
              t.daemon = self.daemon
              t.start()
          except Exception as x:
              logger.exception(x)
  
      # Pump the socket for clients
      self.serverTransport.listen()
      while True:
          try:
              client = self.serverTransport.accept()
              if not client:
                  continue
              self.clients.put(client)
          except Exception as x:
              logger.exception(x)
  
imports: from six.moves import queue
  import logging
  import os
  import threading
  from thrift.protocol import TBinaryProtocol
  from thrift.protocol.THeaderProtocol import THeaderProtocolFactory
  from thrift.transport import TTransport
label_desc: Use image node_id 5 for calling the TThreadPoolServer obj's underlying member method code with example usage: obj.serve() without return types