Ejemplo n.º 1
0
 def call_run():
     # As soon as the thread is done, break the circular reference.
     try:
         self.run()
     finally:
         self.__thread = None
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 2
0
 def call_run():
     # As soon as the thread is done, break the circular reference.
     try:
         self.run()
     finally:
         self.__thread = None
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 3
0
 def join(self, timeout = None):
     # We don't support a timed join here, sorry.
     assert timeout is None
     thread = self.__thread
     if thread is not None:
         thread.join()
         # Clear the circular reference.
         self.__thread = None
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 4
0
 def join(self, timeout=None):
     # We don't support a timed join here, sorry.
     assert timeout is None
     thread = self.__thread
     if thread is not None:
         thread.join()
         # Clear the circular reference.
         self.__thread = None
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 5
0
 def __del__(self):
     # On interpreter shutdown, the _thread module might have
     # already been cleaned up.
     if _thread and _thread._remove_thread_id:
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 6
0
 def __del__(self):
     if _thread and _thread._remove_thread_id:
         _thread._remove_thread_id(self.ident)
Ejemplo n.º 7
0
 def __del__(self):
     # On interpreter shutdown, the _thread module might have
     # already been cleaned up.
     if _thread and _thread._remove_thread_id:
         _thread._remove_thread_id(self.ident)