def do_yield_thread(): # explicitly release the gil, in a way that tries to give more # priority to other threads (as opposed to continuing to run in # the same thread). if rthread.gil_yield_thread(): rthread.gc_thread_run() after_thread_switch()
def do_yield_thread(): # explicitly release the gil, in a way that tries to give more # priority to other threads (as opposed to continuing to run in # the same thread). if rgil.gil_yield_thread(): rthread.gc_thread_run() after_thread_switch()
def yield_thread(): # explicitly release the gil, in a way that tries to give more # priority to other threads (as opposed to continuing to run in # the same thread). if _gil_yield_thread(): from rpython.rlib import rthread rthread.gc_thread_run() _after_thread_switch()
def acquire_maybe_in_new_thread(): if not we_are_translated(): return acquire() from rpython.rlib import rthread rthread.get_or_make_ident( ) #make sure that the threadlocals are initialized _gil_acquire() rthread.gc_thread_run() _after_thread_switch()
def acquire(): if we_are_translated(): from rpython.rlib import rthread _gil_acquire() rthread.gc_thread_run() else: allocate() _emulated_gil_holder.acquire() _after_thread_switch()
def after_external_call(): e = get_errno() rthread.gil_acquire() rthread.gc_thread_run() after_thread_switch() set_errno(e)
def after(): rthread.acquire_NOAUTO(state.ll_lock, True) rthread.gc_thread_run()
def after_external_call(): rgil.gil_acquire() rthread.gc_thread_run() after_thread_switch()
def acquire(): from rpython.rlib import rthread _gil_acquire() rthread.gc_thread_run() _after_thread_switch()
def after_external_call(): e = get_errno() rgil.gil_acquire() rthread.gc_thread_run() after_thread_switch() set_errno(e)