#NEWLINE# def _run( self ) : #NEWLINE# #INDENT# 'this thread will run unmanaged, and so will die dirty when program\n        closes.  therefore we use a monitor thread to make sure any\n        unfinished work is done before the program shuts down\n        ' #NEWLINE# self . load_tracker . start_work ( ) #NEWLINE# while self . running : #NEWLINE# #INDENT# self . load_tracker . finish_work ( ) #NEWLINE# work = self . thread_pool . tasks . get ( ) #NEWLINE# self . load_tracker . start_work ( ) #NEWLINE# try : #NEWLINE# #INDENT# work ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . logger . debug ( traceback . format_exc ( ) ) #NEWLINE# self . thread_pool . thread_manager . signal_shutdown ( ) #NEWLINE# #UNINDENT# self . thread_pool . tasks . task_done ( )