#NEWLINE# def _shutdownActor( self , shutdownChildren = True ) : #NEWLINE# #INDENT# if hasattr ( atexit , 'unregister' ) : #NEWLINE# #INDENT# atexit . unregister ( self . _shutdownActor ) #NEWLINE# #UNINDENT# if getattr ( self , '_exiting' , None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . _exiting = True #NEWLINE# children = self . childAddresses #NEWLINE# if ( shutdownChildren and children ) : #NEWLINE# #INDENT# for each in children : #NEWLINE# #INDENT# self . _send_intent ( TransmitIntent ( shutdownChildren , ActorExitRequest ( recursive = True ) , onError = ( lambda r , m : self . _childInaccessible ( each , m ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _sayGoodbye ( ) #NEWLINE# #UNINDENT# if ( shutdownChildren and children ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# self . transport . abort_run ( drain = True ) #NEWLINE# return True