<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self):
 """ This override threading.Thread to open socket and wait for messages. """

        while True:
            self.open_lock.acquire()
            if self.stopped():
                return
            self.__open()
            self.open_lock.release()