#NEWLINE# def _remove_thread( self ) : #NEWLINE# #INDENT# with self . workers_lock : #NEWLINE# #INDENT# if ( len ( thread . workers ) > 1 ) : #NEWLINE# #INDENT# self . logger . debug ( '{0} : removing worker' . format ( threading . current_thread ( ) ) ) #NEWLINE# thread = self . workers . pop ( ) #NEWLINE# thread . stop ( )