Esempio n. 1
0
File: gil.py Progetto: charred/pypy
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()
Esempio n. 2
0
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()
Esempio n. 3
0
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()
Esempio n. 4
0
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()
Esempio n. 5
0
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()
Esempio n. 6
0
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()
Esempio n. 7
0
File: gil.py Progetto: charred/pypy
def after_external_call():
    e = get_errno()
    rthread.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
    set_errno(e)
Esempio n. 8
0
 def after():
     rthread.acquire_NOAUTO(state.ll_lock, True)
     rthread.gc_thread_run()
Esempio n. 9
0
def after_external_call():
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
Esempio n. 10
0
 def after():
     rthread.acquire_NOAUTO(state.ll_lock, True)
     rthread.gc_thread_run()
Esempio n. 11
0
def after_external_call():
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
Esempio n. 12
0
def acquire():
    from rpython.rlib import rthread
    _gil_acquire()
    rthread.gc_thread_run()
    _after_thread_switch()
Esempio n. 13
0
def acquire():
    from rpython.rlib import rthread
    _gil_acquire()
    rthread.gc_thread_run()
    _after_thread_switch()
Esempio n. 14
0
def after_external_call():
    e = get_errno()
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
    set_errno(e)