Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio n. 6
0
 def __del__(self):
     if _thread and _thread._remove_thread_id:
         _thread._remove_thread_id(self.ident)
Esempio 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)