Exemple #1
0
 def bootstrap():
     ll_thread.gc_thread_start()
     childpid = run_in_thread()
     gc.collect()        # collect both in the child and in the parent
     gc.collect()
     gc.collect()
     if childpid == 0:
         os.write(state.write_end, 'c')   # "I did not die!" from child
     else:
         os.write(state.write_end, 'p')   # "I did not die!" from parent
     ll_thread.gc_thread_die()
Exemple #2
0
 def bootstrap():
     ll_thread.gc_thread_start()
     childpid = run_in_thread()
     gc.collect()        # collect both in the child and in the parent
     gc.collect()
     gc.collect()
     if childpid == 0:
         os.write(state.write_end, 'c')   # "I did not die!" from child
     else:
         os.write(state.write_end, 'p')   # "I did not die!" from parent
     ll_thread.gc_thread_die()
 def bootstrap():
     # Note that when this runs, we already hold the GIL.  This is ensured
     # by rffi's callback mecanism: we are a callback for the
     # c_thread_start() external function.
     space = bootstrapper.space
     w_callable = bootstrapper.w_callable
     args = bootstrapper.args
     bootstrapper.release()
     # run!
     space.threadlocals.enter_thread(space)
     try:
         bootstrapper.run(space, w_callable, args)
     finally:
         # clean up space.threadlocals to remove the ExecutionContext
         # entry corresponding to the current thread
         try:
             space.threadlocals.leave_thread(space)
         finally:
             thread.gc_thread_die()
Exemple #4
0
 def bootstrap():
     # Note that when this runs, we already hold the GIL.  This is ensured
     # by rffi's callback mecanism: we are a callback for the
     # c_thread_start() external function.
     space = bootstrapper.space
     w_callable = bootstrapper.w_callable
     args = bootstrapper.args
     bootstrapper.release()
     # run!
     space.threadlocals.enter_thread(space)
     try:
         bootstrapper.run(space, w_callable, args)
     finally:
         # clean up space.threadlocals to remove the ExecutionContext
         # entry corresponding to the current thread
         try:
             space.threadlocals.leave_thread(space)
         finally:
             thread.gc_thread_die()
Exemple #5
0
 def bootstrap():
     try:
         runme()
     finally:
         thread.gc_thread_die()
Exemple #6
0
 def bootstrap():
     ll_thread.gc_thread_start()
     state.xlist.append(Cons(123, Cons(456, None)))
     gc.collect()
     ll_thread.gc_thread_die()
Exemple #7
0
 def bootstrap():
     try:
         runme()
     finally:
         thread.gc_thread_die()
Exemple #8
0
 def bootstrap():
     ll_thread.gc_thread_start()
     state.xlist.append(Cons(123, Cons(456, None)))
     gc.collect()
     ll_thread.gc_thread_die()