Exemplo n.º 1
0
 def leave_thread(self, space):
     "Notification that the current thread is about to stop."
     from pypy.module.thread.os_local import thread_is_stopping
     try:
         thread_is_stopping(self.getvalue())
     finally:
         self.setvalue(None)
Exemplo n.º 2
0
 def leave_thread(self, space):
     "Notification that the current thread is about to stop."
     from pypy.module.thread.os_local import thread_is_stopping
     try:
         thread_is_stopping(self.getvalue())
     finally:
         self.setvalue(None)
Exemplo n.º 3
0
 def __del__(self):
     from pypy.module.thread.os_local import thread_is_stopping
     # this is always called in another thread: the thread
     # referenced by 'self.ec' has finished at that point, and
     # we're just after the GC which finds no more references to
     # 'ec' (and thus to 'self').
     self.deleted = True
     thread_is_stopping(self.ec)
Exemplo n.º 4
0
 def __del__(self):
     from pypy.module.thread.os_local import thread_is_stopping
     # this is always called in another thread: the thread
     # referenced by 'self.ec' has finished at that point, and
     # we're just after the GC which finds no more references to
     # 'ec' (and thus to 'self').
     self.deleted = True
     thread_is_stopping(self.ec)
Exemplo n.º 5
0
 def leave_thread(self, space):
     "Notification that the current thread is about to stop."
     from pypy.module.thread.os_local import thread_is_stopping
     ec = self.get_ec()
     if ec is not None:
         try:
             thread_is_stopping(ec)
         finally:
             self.raw_thread_local.set(None)
             ident = rthread.get_ident()
             try:
                 del self._valuedict[ident]
             except KeyError:
                 pass
Exemplo n.º 6
0
 def leave_thread(self, space):
     "Notification that the current thread is about to stop."
     from pypy.module.thread.os_local import thread_is_stopping
     ec = self.get_ec()
     if ec is not None:
         try:
             thread_is_stopping(ec)
         finally:
             self.raw_thread_local.set(None)
             ident = rthread.get_ident()
             try:
                 del self._valuedict[ident]
             except KeyError:
                 pass