parameters: (self)
docstring: gain tasks and compute them until ThreadPool sends termination signal
docstring_summary: gain tasks and compute them until ThreadPool sends termination signal
docstring_tokens: gain tasks and compute them until ThreadPool sends termination signal
function: def run(self):
  		""" gain tasks and compute them until ThreadPool sends termination signal """
  		while True:
  			task = self.__tasks.get()
  			if task is None:
  				self.__tasks.task_done()
  				break
  			data = "Error"
  			try:
  				data = task.run()
  			except Exception as e:
  				print("Error: " + task.getType() + " - " + task.getName(), flush=True)
  				print(str(e), flush=True)
  				print(traceback.format_exc(), flush=True)
  			result = (task.getType(), task.getName(), data)
  			self.__tasks.task_done()
  			self.__results.put(result)
function_tokens: def run ( self ) : while True : task = self . __tasks . get ( ) if task is None : self . __tasks . task_done ( ) break data = "Error" try : data = task . run ( ) except Exception as e : print ( "Error: " + task . getType ( ) + " - " + task . getName ( ) , flush = True ) print ( str ( e ) , flush = True ) print ( traceback . format_exc ( ) , flush = True ) result = ( task . getType ( ) , task . getName ( ) , data ) self . __tasks . task_done ( ) self . __results . put ( result )