✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.36
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/hc_python/lib/python3.12/site-packages/urllib3/http2//probe.py
from __future__ import annotations

import threading


class _HTTP2ProbeCache:
    __slots__ = (
        "_lock",
        "_cache_locks",
        "_cache_values",
    )

    def __init__(self) -> None:
        self._lock = threading.Lock()
        self._cache_locks: dict[tuple[str, int], threading.RLock] = {}
        self._cache_values: dict[tuple[str, int], bool | None] = {}

    def acquire_and_get(self, host: str, port: int) -> bool | None:
        # By the end of this block we know that
        # _cache_[values,locks] is available.
        value = None
        with self._lock:
            key = (host, port)
            try:
                value = self._cache_values[key]
                # If it's a known value we return right away.
                if value is not None:
                    return value
            except KeyError:
                self._cache_locks[key] = threading.RLock()
                self._cache_values[key] = None

        # If the value is unknown, we acquire the lock to signal
        # to the requesting thread that the probe is in progress
        # or that the current thread needs to return their findings.
        key_lock = self._cache_locks[key]
        key_lock.acquire()
        try:
            # If the by the time we get the lock the value has been
            # updated we want to return the updated value.
            value = self._cache_values[key]

        # In case an exception like KeyboardInterrupt is raised here.
        except BaseException as e:  # Defensive:
            assert not isinstance(e, KeyError)  # KeyError shouldn't be possible.
            key_lock.release()
            raise

        return value

    def set_and_release(
        self, host: str, port: int, supports_http2: bool | None
    ) -> None:
        key = (host, port)
        key_lock = self._cache_locks[key]
        with key_lock:  # Uses an RLock, so can be locked again from same thread.
            if supports_http2 is None and self._cache_values[key] is not None:
                raise ValueError(
                    "Cannot reset HTTP/2 support for origin after value has been set."
                )  # Defensive: not expected in normal usage

        self._cache_values[key] = supports_http2
        key_lock.release()

    def _values(self) -> dict[tuple[str, int], bool | None]:
        """This function is for testing purposes only. Gets the current state of the probe cache"""
        with self._lock:
            return {k: v for k, v in self._cache_values.items()}

    def _reset(self) -> None:
        """This function is for testing purposes only. Reset the cache values"""
        with self._lock:
            self._cache_locks = {}
            self._cache_values = {}


_HTTP2_PROBE_CACHE = _HTTP2ProbeCache()

set_and_release = _HTTP2_PROBE_CACHE.set_and_release
acquire_and_get = _HTTP2_PROBE_CACHE.acquire_and_get
_values = _HTTP2_PROBE_CACHE._values
_reset = _HTTP2_PROBE_CACHE._reset

__all__ = [
    "set_and_release",
    "acquire_and_get",
]


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
12 May 2025 12.34 PM
root / root
0755
__pycache__
--
12 May 2025 12.34 PM
root / root
0755
__init__.py
1.7 KB
12 May 2025 12.34 PM
root / root
0644
connection.py
12.396 KB
12 May 2025 12.34 PM
root / root
0644
probe.py
2.943 KB
12 May 2025 12.34 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF