示例#1
0
def _new_callback():
    # Here, we just closed the stack.  Get the stack anchor, store
    # it in the gcrootfinder.suspstack.anchor, and create a new
    # stacklet with stacklet_new().  If this call fails, then we
    # are just returning NULL.
    _stack_just_closed()
    return _c.new(gcrootfinder.thrd, llhelper(_c.run_fn, _new_runfn),
                  llmemory.NULL)
示例#2
0
def _new_callback():
    # Here, we just closed the stack.  Get the stack anchor, store
    # it in the gcrootfinder.suspstack.anchor, and create a new
    # stacklet with stacklet_new().  If this call fails, then we
    # are just returning NULL.
    _stack_just_closed()
    return _c.new(gcrootfinder.thrd, llhelper(_c.run_fn, _new_runfn),
                  llmemory.NULL)
示例#3
0
 def new(thrd, callback, arg):
     h = _c.new(thrd._thrd, llhelper(_c.run_fn, callback), arg)
     if not h:
         raise MemoryError
     return h
 def new(thrd, callback, arg):
     gcrootfinder.callback = callback
     thread_handle = thrd._thrd
     prepare_old_suspstack()
     h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
     return get_result_suspstack(h)
示例#5
0
 def new(thrd, callback, arg):
     h = _c.new(thrd._thrd, llhelper(_c.run_fn, callback), arg)
     if not h:
         raise MemoryError
     return h
示例#6
0
 def new(thrd, callback, arg):
     gcrootfinder.callback = callback
     thread_handle = thrd._thrd
     prepare_old_suspstack()
     h = _c.new(thread_handle, llhelper(_c.run_fn, _new_callback), arg)
     return get_result_suspstack(h)