#NEWLINE# def _kill_active_threads( self ) : #NEWLINE# #INDENT# ' Kill all managed threads that were not marked as "protected" when\n        they were spawned.\n\n        This set will include all worker threads generated by\n        :meth:`ServiceContainer.spawn_worker`.\n\n        See :meth:`ServiceContainer.spawn_managed_thread`\n        ' #NEWLINE# num_active_threads = len ( self . _active_threads ) #NEWLINE# if num_active_threads : #NEWLINE# #INDENT# _log . warning ( 'killing %s active thread(s)' , num_active_threads ) #NEWLINE# for ( gt , extension ) in list ( self . _active_threads . items ( ) ) : #NEWLINE# #INDENT# if ( extension is not MANAGED_THREAD ) : #NEWLINE# #INDENT# _log . warning ( 'killing active thread for %s' , extension ) #NEWLINE# #UNINDENT# gt . kill ( )