Did I find the right examples for you? yes no

All Samples(23)  |  Call(11)  |  Derive(0)  |  Import(12)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/thread/gil.py   plexnet(Download)
from pypy.interpreter.executioncontext import PeriodicAsyncAction
from pypy.module.thread.threadlocals import OSThreadLocals
from pypy.rlib.objectmodel import invoke_around_extcall
from pypy.rlib.rposix import get_errno, set_errno
 
        spacestate.ll_GIL = self.ll_GIL
        spacestate.actionflag = space.actionflag
        invoke_around_extcall(before_external_call, after_external_call)
        return result
 

src/s/y/Sypy-HEAD/module/thread/gil.py   Sypy(Download)
from pypy.interpreter.executioncontext import PeriodicAsyncAction
from pypy.module.thread.threadlocals import OSThreadLocals
from pypy.rlib.objectmodel import invoke_around_extcall
from pypy.rlib.rposix import get_errno, set_errno
 
        # test_compile_lock.  As a workaround, we repatch these global
        # fields systematically.
        invoke_around_extcall(before_external_call, after_external_call)
        return result
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/thread/test/test_ll_thread.py   plexnet(Download)
    def test_gc_locking(self):
        import time
        from pypy.rlib.objectmodel import invoke_around_extcall
        from pypy.rlib.objectmodel import we_are_translated
        from pypy.rlib.debug import ll_assert
            # When not translated it does not work around time.sleep(),
            # so we have to call them manually for this test.
            invoke_around_extcall(before_extcall, after_extcall)
 
            g(10, 1)

src/s/y/Sypy-HEAD/translator/c/test/test_standalone.py   Sypy(Download)
    def test_stack_size(self):
        import time
        from pypy.module.thread import ll_thread
        from pypy.rpython.lltypesystem import lltype
        from pypy.rlib.objectmodel import invoke_around_extcall
            after()
            state.count = 0
            invoke_around_extcall(before, after)
            ident1 = ll_thread.start_new_thread(bootstrap, ())
            ident2 = ll_thread.start_new_thread(bootstrap, ())
    def test_thread_and_gc(self):
        import time, gc
        from pypy.module.thread import ll_thread
        from pypy.rpython.lltypesystem import lltype
        from pypy.rlib.objectmodel import invoke_around_extcall
            state.ll_lock = ll_thread.allocate_ll_lock()
            after()
            invoke_around_extcall(before, after)
            ident1 = new_thread()
            ident2 = new_thread()
    def test_gc_with_fork_without_threads(self):
        from pypy.rlib.objectmodel import invoke_around_extcall
        if not hasattr(os, 'fork'):
            py.test.skip("requires fork()")
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/test/test_rffi.py   plexnet(Download)
        import os
        from pypy.annotation import model as annmodel
        from pypy.rlib.objectmodel import invoke_around_extcall
        from pypy.rpython.extfuncregistry import register_external
        read_fd, write_fd = os.pipe()
            def f():
                os.write(write_fd, "-")
                invoke_around_extcall(before, after)
                os.write(write_fd, "E")
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/test/test_standalone.py   plexnet(Download)
    def test_stack_size(self):
        import time
        from pypy.module.thread import ll_thread
        from pypy.rpython.lltypesystem import lltype
        from pypy.rlib.objectmodel import invoke_around_extcall
            after()
            state.count = 0
            invoke_around_extcall(before, after)
            ident1 = ll_thread.start_new_thread(bootstrap, ())
            ident2 = ll_thread.start_new_thread(bootstrap, ())
    def test_thread_and_gc(self):
        import time, gc
        from pypy.module.thread import ll_thread
        from pypy.rpython.lltypesystem import lltype
        from pypy.rlib.objectmodel import invoke_around_extcall
            state.ll_lock = ll_thread.allocate_ll_lock()
            after()
            invoke_around_extcall(before, after)
            ident1 = ll_thread.start_new_thread(bootstrap, ())
            ident2 = ll_thread.start_new_thread(bootstrap, ())

src/s/y/Sypy-HEAD/rpython/lltypesystem/test/test_rffi.py   Sypy(Download)
        import os
        from pypy.annotation import model as annmodel
        from pypy.rlib.objectmodel import invoke_around_extcall
        from pypy.rpython.extfuncregistry import register_external
        read_fd, write_fd = os.pipe()
            def f():
                os.write(write_fd, "-")
                invoke_around_extcall(before, after)
                os.write(write_fd, "E")
 

src/s/y/Sypy-HEAD/module/thread/test/test_ll_thread.py   Sypy(Download)
    def test_gc_locking(self):
        import time
        from pypy.rlib.objectmodel import invoke_around_extcall
        from pypy.rlib.debug import ll_assert
 
            # the next line installs before_extcall() and after_extcall()
            # to be called automatically around external function calls.
            invoke_around_extcall(before_extcall, after_extcall)
 
            g(10, 1)