#NEWLINE# def _kill_protected_threads( self ) : #NEWLINE# #INDENT# ' Kill any managed threads marked as protected when they were\n        spawned.\n\n        See :meth:`ServiceContainer.spawn_managed_thread`\n        ' #NEWLINE# num_protected_threads = len ( self . _protected_threads ) #NEWLINE# if num_protected_threads : #NEWLINE# #INDENT# _log . warning ( 'killing %s protected thread(s)' , num_protected_threads ) #NEWLINE# for gt in list ( self . _protected_threads ) : #NEWLINE# #INDENT# gt . kill ( )