#NEWLINE# def run( self ) : #NEWLINE# #INDENT# self . _stopped = False #NEWLINE# self . _logger . info ( 'server thread start' ) #NEWLINE# while ( not self . _stop . is_set ( ) ) : #NEWLINE# #INDENT# cmd_list = self . _interface . polling_command ( ) #NEWLINE# for ( submitter , cmd ) in cmd_list : #NEWLINE# #INDENT# worker = Thread ( target = self . _process_command , args = ( cmd , submitter ) ) #NEWLINE# worker . start ( ) #NEWLINE# #UNINDENT# self . _stop . wait ( worker . _response_wait ) #NEWLINE# #UNINDENT# self . _stopped = True #NEWLINE# self . _logger . info ( 'Thread stop' )