Example #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()
Example #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()
Example #3
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.
     thread.gc_thread_start()
     space = bootstrapper.space
     w_callable = bootstrapper.w_callable
     args = bootstrapper.args
     bootstrapper.nbthreads += 1
     bootstrapper.release()
     # run!
     try:
         bootstrapper.run(space, w_callable, args)
     finally:
         bootstrapper.nbthreads -= 1
         # 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()
Example #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.
     thread.gc_thread_start()
     space = bootstrapper.space
     w_callable = bootstrapper.w_callable
     args = bootstrapper.args
     bootstrapper.nbthreads += 1
     bootstrapper.release()
     # run!
     try:
         bootstrapper.run(space, w_callable, args)
     finally:
         bootstrapper.nbthreads -= 1
         # 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()
Example #5
0
 def bootstrap():
     ll_thread.gc_thread_start()
     state.xlist.append(Cons(123, Cons(456, None)))
     gc.collect()
     ll_thread.gc_thread_die()
Example #6
0
 def bootstrap():
     ll_thread.gc_thread_start()
     state.xlist.append(Cons(123, Cons(456, None)))
     gc.collect()
     ll_thread.gc_thread_die()