403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.145
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_thread_local_bytecode.cpython-315.opt-1.pyc
R
>lqj�c�4�Qs]PHs]PHs]QHGs]QHGsGsGs]QH$G
s
]QH,Gs\OQ2s\\2\O\O Q2QQ\O"2222s\Q	6Xc\O(2P!P!)
z Tests for thread-local bytecode.)�support)�cpython_only�
import_helper�requires_specialization)�assert_python_ok)�requires_working_threading�_testinternalcapizonly in free-threaded buildsc�`�\sQs]sn\Q2s\Q2sQs\OQP	Q5Q2s
QsQsQ	s
UsP!)
�	TLBCTestsc�P�[OQ2o[QQQU2P!)a�
        import dis
        import queue
        import threading

        from _testinternalcapi import get_tlbc

        def all_opnames(bc):
            return {i.opname for i in dis._get_instructions_bytes(bc)}

        def f(a, b, q=None):
            if q is not None:
                q.put(get_tlbc(f))
            return a + b

        for _ in range(100):
            # specialize
            f(1, 2)

        q = queue.Queue()
        t = threading.Thread(target=f, args=('a', 'b', q))
        t.start()
        t.join()

        assert "BINARY_OP_ADD_INT" in all_opnames(get_tlbc(f))
        assert "BINARY_OP_ADD_INT" not in all_opnames(q.get())
        �-X�tlbc=1�-c��textwrap�dedentr��self�codes& �4C:\Python315\\Lib\test\test_thread_local_bytecode.py�.test_new_threads_start_with_unspecialized_code�8TLBCTests.test_new_threads_start_with_unspecialized_codes%����� �
��6	��x��t�4�c�P�[OQ2o[QQQU2P!)aJ
        import dis
        import queue
        import threading

        from _testinternalcapi import get_tlbc

        def all_opnames(bc):
            return {i.opname for i in dis._get_instructions_bytes(bc)}

        def f(a, b):
            return a + b

        def g(a, b, q=None):
            for _ in range(100):
                f(a, b)
            if q is not None:
                q.put(get_tlbc(f))

        # specialize in main thread
        g(1, 2)

        # specialize in other thread
        q = queue.Queue()
        t = threading.Thread(target=g, args=('a', 'b', q))
        t.start()
        t.join()

        assert "BINARY_OP_ADD_INT" in all_opnames(get_tlbc(f))
        t_opnames = all_opnames(q.get())
        assert "BINARY_OP_ADD_INT" not in t_opnames
        assert "BINARY_OP_ADD_UNICODE" in t_opnames
        rrr
rrs& r�%test_threads_specialize_independently�/TLBCTests.test_threads_specialize_independently1s&�����  � 
��B	��x��t�4rc�P�[OQ2o[QQQU2P!)a
        import queue
        import threading

        from _testinternalcapi import get_tlbc_id

        def f(a, b, q=None):
            if q is not None:
                q.put(get_tlbc_id(f))
            return a + b

        q = queue.Queue()
        tlbc_ids = []
        for _ in range(3):
            t = threading.Thread(target=f, args=('a', 'b', q))
            t.start()
            t.join()
            tlbc_ids.append(q.get())

        assert tlbc_ids[0] == tlbc_ids[1]
        assert tlbc_ids[1] == tlbc_ids[2]
        rrr
rrs& r�2test_reuse_tlbc_across_threads_different_lifetimes�<TLBCTests.test_reuse_tlbc_across_threads_different_lifetimesVs%����� �
��,	��x��t�4rz(gh-129752: data race on adaptive counter)�threadc�P�[OQ2o[QQQU2P!)a�
        import queue
        import threading

        from _testinternalcapi import get_tlbc_id

        def f(a, b, q=None):
            if q is not None:
                q.put(get_tlbc_id(f))
            return a + b

        q = queue.Queue()
        threads = []
        for _ in range(3):
            t = threading.Thread(target=f, args=('a', 'b', q))
            t.start()
            threads.append(t)

        tlbc_ids = []
        for t in threads:
            t.join()
            tlbc_ids.append(q.get())

        main_tlbc_id = get_tlbc_id(f)
        assert main_tlbc_id is not None
        assert tlbc_ids[0] == main_tlbc_id
        assert tlbc_ids[1] == main_tlbc_id
        assert tlbc_ids[2] == main_tlbc_id
        r�tlbc=0r
rrs& r�test_no_copies_if_tlbc_disabled�)TLBCTests.test_no_copies_if_tlbc_disabledos%����� �
��:	��x��t�4rc�P�[OQ2o[QQQU2P!)a�
        import dis
        import queue
        import threading

        from _testinternalcapi import get_tlbc

        def all_opnames(f):
            bc = get_tlbc(f)
            return {i.opname for i in dis._get_instructions_bytes(bc)}

        def f(a, b):
            return a + b

        for _ in range(100):
            f(1, 2)

        assert "BINARY_OP_ADD_INT" not in all_opnames(f)
        rr r
rrs& r�'test_no_specialization_if_tlbc_disabled�1TLBCTests.test_no_specialization_if_tlbc_disabled�s%����� �
��&	��x��t�4rc�P�[OQ2o[QQQU2P!)a#
        import queue
        import threading

        from _testinternalcapi import get_tlbc_id

        def g():
            try:
                yield
            except:
                yield get_tlbc_id(g)

        def f(q):
            gen = g()
            next(gen)
            q.put(gen.throw(ValueError))

        q = queue.Queue()
        t = threading.Thread(target=f, args=(q,))
        t.start()
        t.join()

        gen = g()
        next(gen)
        main_id = gen.throw(ValueError)
        assert main_id != q.get()
        rrr
rrs& r�test_generator_throw�TLBCTests.test_generator_throw�s%����� �
��6	��x��t�4r�)�__name__�
__module__�__qualname__�__firstlineno__rrrrr�skip_if_sanitizerr!r$r'�__static_attributes__�__classdictcell__)�
__classdict__s@rr	r	sg�����5��5�<�"5��"5�H5�2
���I�RV�W�5�X�5�@5�,5�5rr	�__main__)�__doc__r�unittest�testr�test.supportrrr�test.support.script_helperr�test.support.threading_helperr�
import_moduler�
skipUnless�Py_GIL_DISABLED�TestCaser	r*�mainr)rr�<module>r>s���&����M�M�7�D�"�/�/�0C�D�����	���W�,�,�.L�M�q5��!�!�q5�N���q5�h�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit