示例#1
0
文件: asmgcroot.py 项目: ieure/pypy
 def thread_die():
     gcdata.aid2stack.setitem(get_aid(), llmemory.NULL)
     # from time to time, rehash the dictionary to remove
     # old NULL entries
     gcdata.dead_threads_count += 1
     if (gcdata.dead_threads_count & 511) == 0:
         gcdata.aid2stack = copy_without_null_values(gcdata.aid2stack)
示例#2
0
 def thread_die():
     gcdata.aid2stack.setitem(get_aid(), llmemory.NULL)
     # from time to time, rehash the dictionary to remove
     # old NULL entries
     gcdata.dead_threads_count += 1
     if (gcdata.dead_threads_count & 511) == 0:
         copy = copy_without_null_values(gcdata.aid2stack)
         gcdata.aid2stack.delete()
         gcdata.aid2stack = copy
示例#3
0
 def thread_die():
     """Called just before the final GIL release done by a dying
     thread.  After a thread_die(), no more gc operation should
     occur in this thread.
     """
     aid = get_aid()
     gcdata.thread_stacks.setitem(aid, llmemory.NULL)
     old = gcdata.root_stack_base
     if gcdata._fresh_rootstack == llmemory.NULL:
         gcdata._fresh_rootstack = old
     else:
         llmemory.raw_free(old)
     install_new_stack(gcdata.main_thread)
     # from time to time, rehash the dictionary to remove
     # old NULL entries
     gcdata.dead_threads_count += 1
     if (gcdata.dead_threads_count & 511) == 0:
         gcdata.thread_stacks = copy_without_null_values(
             gcdata.thread_stacks)
示例#4
0
 def thread_die():
     """Called just before the final GIL release done by a dying
     thread.  After a thread_die(), no more gc operation should
     occur in this thread.
     """
     aid = get_aid()
     gcdata.thread_stacks.setitem(aid, llmemory.NULL)
     old = gcdata.root_stack_base
     if gcdata._fresh_rootstack == llmemory.NULL:
         gcdata._fresh_rootstack = old
     else:
         llmemory.raw_free(old)
     install_new_stack(gcdata.main_thread)
     # from time to time, rehash the dictionary to remove
     # old NULL entries
     gcdata.dead_threads_count += 1
     if (gcdata.dead_threads_count & 511) == 0:
         gcdata.thread_stacks = copy_without_null_values(
             gcdata.thread_stacks)