コード例 #1
0
ファイル: gil.py プロジェクト: 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()
コード例 #2
0
ファイル: gil.py プロジェクト: zielmicha/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 rgil.gil_yield_thread():
        rthread.gc_thread_run()
        after_thread_switch()
コード例 #3
0
ファイル: rgil.py プロジェクト: abhinavthomas/pypy
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()
コード例 #4
0
ファイル: rgil.py プロジェクト: grubermeister/kamina-script
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()
コード例 #5
0
ファイル: rgil.py プロジェクト: zcxowwww/pypy
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()
コード例 #6
0
ファイル: rgil.py プロジェクト: zcxowwww/pypy
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()
コード例 #7
0
ファイル: gil.py プロジェクト: charred/pypy
def after_external_call():
    e = get_errno()
    rthread.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
    set_errno(e)
コード例 #8
0
ファイル: test_standalone.py プロジェクト: juokaz/pypy
 def after():
     rthread.acquire_NOAUTO(state.ll_lock, True)
     rthread.gc_thread_run()
コード例 #9
0
ファイル: gil.py プロジェクト: zielmicha/pypy
def after_external_call():
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
コード例 #10
0
ファイル: test_standalone.py プロジェクト: bukzor/pypy
 def after():
     rthread.acquire_NOAUTO(state.ll_lock, True)
     rthread.gc_thread_run()
コード例 #11
0
ファイル: threads.py プロジェクト: johnwalker/pixie
def after_external_call():
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
コード例 #12
0
ファイル: rgil.py プロジェクト: abhinavthomas/pypy
def acquire():
    from rpython.rlib import rthread
    _gil_acquire()
    rthread.gc_thread_run()
    _after_thread_switch()
コード例 #13
0
ファイル: rgil.py プロジェクト: grubermeister/kamina-script
def acquire():
    from rpython.rlib import rthread
    _gil_acquire()
    rthread.gc_thread_run()
    _after_thread_switch()
コード例 #14
0
ファイル: threads.py プロジェクト: mwfogleman/pixie
def after_external_call():
    e = get_errno()
    rgil.gil_acquire()
    rthread.gc_thread_run()
    after_thread_switch()
    set_errno(e)