You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
multiprocessing Server's shutdown method useless send message to manager #76195
When shutdown the manager, Server's handle_request will send back message to the manager, so is useless for the Server's shutdown method send back "None" to the manager?
defshutdown(self, c):
''' Shutdown this process '''try:
util.debug('manager received shutdown message')
# Is useless here?c.send(('#RETURN', None))
except:
importtracebacktraceback.print_exc()
finally:
self.stop_event.set()
Server's handle_request may throw and catch exception because the conn is closed in _finalize_manager() after Server's shutdown method returns.
Activity
subler commentedon Nov 13, 2017
When shutdown the manager, Server's handle_request will send back message to the manager, so is useless for the Server's shutdown method send back "None" to the manager?
Source code from Lib/multiprocessing/managers.py:
Server's handle_request may throw and catch exception because the conn is closed in _finalize_manager() after Server's shutdown method returns.
code from handle_request():
code from _finalize_manager():
Also the Server's shutdown method only used by manager class.