code: def shutdown(self):
          
          if self.ZMQcontext and not self.ZMQcontext.closed:
              scoop.SHUTDOWN_REQUESTED = True
              self.socket.send(SHUTDOWN)
              
              # pyzmq would issue an 'no module named zmqerror' on windows
              # without this
              try:
                  self.direct_socket.__del__()
                  self.socket.__del__()
                  self.infoSocket.__del__()
              except AttributeError:
                  # Older versions of pyzmq doesn't have the __del__ method
                  pass
  
              self.ZMQcontext.destroy()
docs: Sends a shutdown message to other workers.