<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shutdown(self):
 """ Request the system to shutdown the main loop and shutdown the system This is a one-way trip! Reconnecting requires a new connection to be made! """

        self._request_shutdown = True
        for i in range(100):
            if self._state == STATE_DISCONNECTED:
                break
            time.sleep(0.1)