# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-09-26 04:08+0000\n" "PO-Revision-Date: 2026-09-26 07:49+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" msgid "Python support for free threading" msgstr "پشتیبانی پایتون از نخ‌بندی آزاد" msgid "Starting with the 3.13 release, CPython has support for a build of Python called :term:`free threading` where the :term:`global interpreter lock` (GIL) is disabled. Free-threaded execution allows for full utilization of the available processing power by running threads in parallel on available CPU cores. While not all software will benefit from this automatically, programs designed with threading in mind will run faster on multi-core hardware." msgstr "از نسخه‌ی 3.13، CPython از ساختی از پایتون به نام نخ‌بندی آزاد (:term:`free threading`) پشتیبانی می‌کند که در آن قفل سراسری مفسر (:term:`global interpreter lock`، GIL) غیرفعال است. اجرای نخ‌بندی آزاد امکان بهره‌برداری کامل از توان پردازشی موجود را با اجرای موازی نخ‌ها بر روی هسته‌های CPU موجود فراهم می‌کند. اگرچه همه‌ی نرم‌افزارها به‌طور خودکار از آن بهره‌مند نخواهند شد، برنامه‌هایی که با در نظر گرفتن نخ‌بندی طراحی شده‌اند، روی سخت‌افزار چندهسته‌ای سریع‌تر اجرا خواهند شد." msgid "Some third-party packages, in particular ones with an :term:`extension module`, may not be ready for use in a free-threaded build, and will re-enable the :term:`GIL`." msgstr "برخی بسته‌های شخص ثالث، به‌ویژه آن‌هایی که یک :term:`extension module` دارند، ممکن است برای استفاده در یک ساخت نخ‌آزادی (free-threaded build) آماده نباشند، و :term:`GIL` را دوباره فعال خواهند کرد." msgid "This document describes the implications of free threading for Python code. See :ref:`freethreading-extensions-howto` for information on how to write C extensions that support the free-threaded build." msgstr "این سند پیامدهای نخ‌بندی آزاد برای کد پایتون را توضیح می‌دهد. برای اطلاع از نحوه نوشتن افزونه‌های C که از ساخت نخ‌آزاد (free-threaded build) پشتیبانی می‌کنند، :ref:`freethreading-extensions-howto` را ببینید." msgid ":pep:`703` – Making the Global Interpreter Lock Optional in CPython for an overall description of free-threaded Python." msgstr ":pep:`703` – اختیاری کردن قفل سراسری مفسر در CPython، برای توصیفی کلی از پایتون نخ‌آزاد (free-threaded Python)." msgid "Installation" msgstr "نصب" msgid "Starting with Python 3.13, the official macOS and Windows installers optionally support installing free-threaded Python binaries. The installers are available at https://www.python.org/downloads/." msgstr "از پایتون 3.13 به بعد، نصب‌کننده‌های رسمی macOS و Windows به‌صورت اختیاری از نصب دودویی‌های نخ‌آزاد پایتون پشتیبانی می‌کنند. این نصب‌کننده‌ها در https://www.python.org/downloads/ در دسترس هستند." msgid "For information on other platforms, see the `Installing a Free-Threaded Python `_, a community-maintained installation guide for installing free-threaded Python." msgstr "برای اطلاعات درباره‌ی سایر پلتفرم‌ها، `نصب پایتون نخ‌آزاد `_ را ببینید، یک راهنمای نصب نگهداری‌شده توسط کامیونیتی برای نصب پایتون نخ‌آزاد." msgid "When building CPython from source, the :option:`--disable-gil` configure option should be used to build a free-threaded Python interpreter." msgstr "هنگام ساخت CPython از منبع، برای ساخت یک مفسر پایتون نخ‌آزاد باید از گزینه‌ی :option:`--disable-gil` در configure استفاده شود." msgid "Identifying free-threaded Python" msgstr "شناسایی پایتون نخ‌آزاد" msgid "To check if the current interpreter supports free-threading, :option:`python -VV <-V>` and :data:`sys.version` contain \"free-threading build\". The new :func:`sys._is_gil_enabled` function can be used to check whether the GIL is actually disabled in the running process." msgstr "برای بررسی این‌که آیا مفسر فعلی از نخ‌آزاد پشتیبانی می‌کند، :option:`python -VV <-V>` و :data:`sys.version` شامل \"free-threading build\" هستند. می‌توانید از تابع جدید :func:`sys._is_gil_enabled` برای بررسی این‌که آیا قفل سراسری مفسر (GIL) در فرایند در حال اجرا واقعاً غیرفعال است، استفاده کنید." msgid "The ``sysconfig.get_config_var(\"Py_GIL_DISABLED\")`` configuration variable can be used to determine whether the build supports free threading. If the variable is set to ``1``, then the build supports free threading. This is the recommended mechanism for decisions related to the build configuration." msgstr "می‌توان از متغیر پیکربندی ``sysconfig.get_config_var(\"Py_GIL_DISABLED\")`` برای تعیین اینکه آیا ساخت از نخ‌بندی آزاد پشتیبانی می‌کند، استفاده کرد. اگر این متغیر روی ``1`` تنظیم شده باشد، ساخت از نخ‌بندی آزاد پشتیبانی می‌کند. این سازوکار توصیه‌شده برای تصمیم‌های مربوط به پیکربندی ساخت است." msgid "The global interpreter lock in free-threaded Python" msgstr "قفل سراسری مفسر در پایتون نخ‌آزاد" msgid "Free-threaded builds of CPython support optionally running with the GIL enabled at runtime using the environment variable :envvar:`PYTHON_GIL` or the command-line option :option:`-X gil`." msgstr "ساخت‌های نخ‌آزادی CPython از اجرای اختیاری با GIL فعال در ران‌تایم، با استفاده از متغیر محیطی :envvar:`PYTHON_GIL` یا گزینه‌ی خط فرمان :option:`-X gil` پشتیبانی می‌کنند." msgid "The GIL may also automatically be enabled when importing a C-API extension module that is not explicitly marked as supporting free threading. A warning will be printed in this case." msgstr "ممکن است GIL همچنین به‌صورت خودکار هنگام ایمپورت کردن یک ماژول توسعه‌ی C-API که به‌صراحت به‌عنوان پشتیبانی‌کننده از نخ‌بندی آزاد علامت‌گذاری نشده باشد، فعال شود. در این حالت هشداری چاپ خواهد شد." msgid "In addition to individual package documentation, the following websites track the status of popular packages support for free threading:" msgstr "علاوه بر مستندات هر بسته، وب‌سایت‌های زیر وضعیت پشتیبانی بسته‌های محبوب از نخ‌بندی آزاد را پیگیری می‌کنند:" msgid "https://py-free-threading.github.io/tracking/" msgstr "https://py-free-threading.github.io/tracking/" msgid "https://hugovk.github.io/free-threaded-wheels/" msgstr "https://hugovk.github.io/free-threaded-wheels/" msgid "Thread safety" msgstr "ایمنی نخ" msgid "The free-threaded build of CPython aims to provide similar thread-safety behavior at the Python level to the default GIL-enabled build. Built-in types like :class:`dict`, :class:`list`, and :class:`set` use internal locks to protect against concurrent modifications in ways that behave similarly to the GIL. See :ref:`threadsafety` for the guarantees provided by built-in types." msgstr "ساخت نخ‌آزاد CPython هدف دارد در سطح پایتون، رفتاری مشابه از نظر ایمنی در برابر نخ‌ها با ساخت پیش‌فرض دارای GIL ارائه کند. انواع توکار مانند :class:`dict`، :class:`list` و :class:`set` از قفل‌های داخلی برای محافظت در برابر تغییرات هم‌زمان استفاده می‌کنند؛ به‌گونه‌ای که این رفتار مشابه GIL عمل می‌کند. برای تضمین‌های ارائه‌شده توسط انواع توکار، به :ref:`threadsafety` مراجعه کنید." msgid "It's recommended to use the :class:`threading.Lock` or other synchronization primitives instead of relying on the internal locks of built-in types, when possible." msgstr "توصیه می‌شود در صورت امکان به‌جای تکیه بر قفل‌های داخلی انواع توکار، از :class:`threading.Lock` یا دیگر اولیه‌های همگام‌سازی (synchronization primitives) استفاده کنید." msgid "Known limitations" msgstr "محدودیت‌های شناخته‌شده" msgid "This section describes known limitations of the free-threaded CPython build." msgstr "این بخش محدودیت‌های شناخته‌شده‌ی ساخت CPython با نخ‌های آزادرا شرح می‌دهد." msgid "Immortalization" msgstr "نامیراسازی" msgid "In the free-threaded build, some objects are :term:`immortal`. Immortal objects are not deallocated and have reference counts that are never modified. This is done to avoid reference count contention that would prevent efficient multi-threaded scaling." msgstr "در ساخت free-threaded، برخی اشیاء :term:`نامیرا ` هستند. اشیاء نامیرا آزاد نمی‌شوند و شمارش ارجاع آن‌ها هرگز تغییر نمی‌کند. این کار برای اجتناب از رقابت بر سر شمارش ارجاع انجام می‌شود که مانع از مقیاس‌پذیری کارآمد چندنخی می‌شود." msgid "As of the 3.14 release, immortalization is limited to:" msgstr "از زمان انتشار نسخه‌ی 3.14، نامیرا شدن محدود است به:" msgid "Code constants: numeric literals, string literals, and tuple literals composed of other constants." msgstr "مقادیر ثابت کد: مقادیر لفظی عددی، رشته‌ای و تاپلی تشکیل‌شده از ثابت‌های دیگر." msgid "Strings interned by :func:`sys.intern`." msgstr "رشته‌های درونی‌سازی‌شده توسط :func:`sys.intern`." msgid "Frame objects" msgstr "اشیای فریم" msgid "It is not safe to access :attr:`frame.f_locals` from a :ref:`frame ` object if that frame is currently executing in another thread, and doing so may crash the interpreter." msgstr "دسترسی به :attr:`frame.f_locals` از یک شیء :ref:`فریم ` در صورتی که آن فریم در حال حاضر در نخ دیگری در حال اجرا است، ایمن نیست و انجام این کار ممکن است باعث از کار افتادن مفسر شود." msgid "Iterators" msgstr "پیمایش‌گرها" msgid "It is generally not thread-safe to access the same iterator object from multiple threads concurrently, and threads may see duplicate or missing elements." msgstr "دسترسی همزمان به یک شیء پیمایش‌گر یکسان از طریق چندین نخ، عموماً ایمن در برابر نخ (thread-safe) نیست و نخ‌ها ممکن است عناصر تکراری یا ازدست‌رفته را مشاهده کنند." msgid "Single-threaded performance" msgstr "عملکرد تک‌نخی" msgid "The free-threaded build has additional overhead when executing Python code compared to the default GIL-enabled build. The amount of overhead depends on the workload and hardware. On the pyperformance benchmark suite, the average overhead ranges from about 1% on macOS aarch64 to 8% on x86-64 Linux systems." msgstr "ساخت نخ‌آزاد (free-threaded build) در مقایسه با ساخت پیش‌فرض با GIL فعال، هنگام اجرای کد پایتون سربار اضافی دارد. میزان سربار به بار کاری و سخت‌افزار بستگی دارد. در بدنه بنچمارک pyperformance، میانگین سربار از حدود ۱٪ در macOS aarch64 تا ۸٪ در سیستم‌های لینوکس x86-64 متغیر است." msgid "Behavioral changes" msgstr "تغییرات رفتاری" msgid "This section describes CPython behavioural changes with the free-threaded build." msgstr "این بخش تغییرات رفتاری CPython را در ساخت نخ‌آزاد (free-threaded build) توصیف می‌کند." msgid "Context variables" msgstr "متغیرهای زمینه" msgid "In the free-threaded build, the flag :data:`~sys.flags.thread_inherit_context` is set to true by default which causes threads created with :class:`threading.Thread` to start with a copy of the :class:`~contextvars.Context()` of the caller of :meth:`~threading.Thread.start`. In the default GIL-enabled build, the flag defaults to false so threads start with an empty :class:`~contextvars.Context()`." msgstr "در ساخت نخ‌آزاد، پرچم :data:`~sys.flags.thread_inherit_context` به‌طور پیش‌فرض روی true تنظیم شده است که باعث می‌شود نخ‌های ایجادشده با :class:`threading.Thread` با یک کپی از :class:`~contextvars.Context()` متعلق به فراخواننده‌ی :meth:`~threading.Thread.start` آغاز شوند. در ساخت پیش‌فرض با GIL فعال (GIL-enabled)، این پرچم به‌طور پیش‌فرض false است، بنابراین نخ‌ها با یک :class:`~contextvars.Context()` خالی آغاز می‌شوند." msgid "Warning filters" msgstr "فیلترهای هشدار" msgid "In the free-threaded build, the flag :data:`~sys.flags.context_aware_warnings` is set to true by default. In the default GIL-enabled build, the flag defaults to false. If the flag is true then the :class:`warnings.catch_warnings` context manager uses a context variable for warning filters. If the flag is false then :class:`~warnings.catch_warnings` modifies the global filters list, which is not thread-safe. See the :mod:`warnings` module for more details." msgstr "در ساخت نخ‌آزادی، پرچم :data:`~sys.flags.context_aware_warnings` به‌صورت پیش‌فرض روی درست تنظیم شده است. در ساخت پیش‌فرض با GIL فعال (GIL-enabled)، این پرچم به‌طور پیش‌فرض نادرست است. اگر پرچم درست باشد، مدیر زمینه :class:`warnings.catch_warnings` از یک متغیر زمینه برای فیلترهای هشدار استفاده می‌کند. اگر پرچم نادرست باشد، :class:`~warnings.catch_warnings` فهرست فیلترهای سراسری را تغییر می‌دهد، که ایمن برای نخ‌ها (thread-safe) نیست. برای جزئیات بیشتر، ماژول :mod:`warnings` را ببینید." msgid "Increased memory usage" msgstr "افزایش مصرف حافظه" msgid "The free-threaded build will typically use more memory compared to the default build. There are multiple reasons for this, mostly due to design decisions." msgstr "ساخت با نخ‌های آزادبه‌طور معمول در مقایسه با ساخت پیش‌فرض از حافظه‌ی بیشتری استفاده می‌کند. دلایل متعددی برای این موضوع وجود دارد که عمدتاً به‌دلیل تصمیم‌های طراحی است." msgid "All interned strings are immortal" msgstr "همه‌ی رشته‌های درونی‌سازی‌شده نامیرا هستند" msgid "For modern Python versions (since version 2.3), interning a string (e.g. with :func:`sys.intern`) does not cause it to become immortal. Instead, if the last reference to that string disappears, it will be removed from the interned string table. This is not the case for the free-threaded build and any interned string will become immortal, surviving until interpreter shutdown." msgstr "در نسخه‌های مدرن پایتون (از نسخه‌ی 2.3)، اینترن کردن (interning) یک رشته (برای نمونه با :func:`sys.intern`) باعث نامیرا شدن آن نمی‌شود. در عوض، اگر آخرین ارجاع به آن رشته از بین برود، آن رشته از جدول رشته‌های درونی‌سازی‌شده (interned string table) حذف خواهد شد. این موضوع در مورد ساخته‌ی نخ‌آزادی (free-threaded build) صدق نمی‌کند و هر رشته‌ی درونی‌سازی‌شده‌ای نامیرا خواهد شد و تا خاموش شدن مفسر باقی خواهد ماند." msgid "Non-GC objects have a larger object header" msgstr "اشیای غیر GC سرآیند شیء بزرگ‌تری دارند" msgid "The free-threaded build uses a different :c:type:`PyObject` structure. Instead of having the GC related information allocated before the :c:type:`PyObject` structure, like in the default build, the GC related info is part of the normal object header. For example, on the AMD64 platform, ``None`` uses 32 bytes on the free-threaded build vs 16 bytes for the default build. GC objects (such as dicts and lists) are the same size for both builds since the free-threaded build does not use additional space for the GC info." msgstr "ساخت نخ‌آزاد از ساختار :c:type:`PyObject` متفاوتی استفاده می‌کند. به جای این که اطلاعات مربوط به زباله‌روبی، مانند ساخت پیش‌فرض، پیش از ساختار :c:type:`PyObject` تخصیص داده شود، این اطلاعات بخشی از سرآیند معمولی شیء است. برای نمونه، در سکوی AMD64، ``None`` در ساخت نخ‌آزاد از ۳۲ بایت استفاده می‌کند، در مقابل ۱۶ بایت برای ساخت پیش‌فرض. اشیای تحت مدیریت زباله‌روبی (مانند دیکشنری‌ها و فهرست‌ها) در هر دو ساخت اندازه یکسانی دارند، زیرا ساخت نخ‌آزاد از فضای اضافی برای اطلاعات مربوط به زباله‌روبی استفاده نمی‌کند." msgid "QSBR can delay freeing of memory" msgstr "QSBR می‌تواند آزادسازی حافظه را به تأخیر بیندازد" msgid "In order to safely implement lock-free data structures, a safe memory reclamation (SMR) scheme is used, known as quiescent state-based reclamation (QSBR). This means that the memory backing data structures allowing lock-free access will use QSBR, which defers the free operation, rather than immediately freeing the memory. Two examples of these data structures are the list object and the dictionary keys object. See ``InternalDocs/qsbr.md`` in the CPython source tree for more details on how QSBR is implemented. Running :func:`gc.collect` should cause all memory being held by QSBR to be actually freed. Note that even when QSBR frees the memory, the underlying memory allocator may not immediately return that memory to the OS and so the resident set size (RSS) of the process might not decrease." msgstr "برای پیاده‌سازی امن ساختارهای داده بدون قفل (lock-free)، از یک طرح بازیابی امن حافظه (SMR) استفاده می‌شود که با نام بازیابی مبتنی بر حالت سکون (QSBR) شناخته می‌شود. این بدان معناست که حافظه پشتیبان ساختارهای داده‌ای که دسترسی بدون قفل را ممکن می‌سازند، از QSBR استفاده می‌کند؛ این طرح عملیات آزادسازی را به تعویق می‌اندازد، نه اینکه حافظه را بلافاصله آزاد کند. دو نمونه از این ساختارهای داده، شیء فهرست و شیء کلیدهای دیکشنری هستند. برای جزئیات بیشتر درباره نحوه پیاده‌سازی QSBR، پرونده ``InternalDocs/qsbr.md`` را در درخت منبع CPython ببینید. اجرای :func:`gc.collect` باید موجب شود تمام حافظه‌ای که توسط QSBR نگه‌داری می‌شود، به‌طور واقعی آزاد شود. توجه داشته باشید که حتی وقتی QSBR حافظه را آزاد می‌کند، تخصیص‌دهنده حافظه زیرین ممکن است بلافاصله آن حافظه را به سیستم‌عامل برنگرداند و بنابراین اندازه مجموعه مقیم (RSS) فرایند ممکن است کاهش نیابد." msgid "mimalloc allocator vs pymalloc" msgstr "تخصیص‌دهنده‌ی mimalloc در مقابل pymalloc" msgid "The default build will normally use the \"pymalloc\" memory allocator for small allocations (512 bytes or smaller). The free-threaded build does not use pymalloc and allocates all Python objects using the \"mimalloc\" allocator. The pymalloc allocator has the following properties that help keep memory usage low: small per-allocated-block overhead, effective memory fragmentation prevention, and quick return of free memory to the operating system. The mimalloc allocator does quite well in these respects as well but can have some more overhead." msgstr "ساخت پیش‌فرض معمولاً از تخصیص‌دهنده‌ی حافظه‌ی \"pymalloc\" برای تخصیص‌های کوچک (۵۱۲ بایت یا کوچک‌تر) استفاده می‌کند. ساخت نخ‌آزاد از pymalloc استفاده نمی‌کند و همه‌ی اشیای پایتون را با استفاده از تخصیص‌دهنده‌ی \"mimalloc\" تخصیص می‌دهد. تخصیص‌دهنده‌ی pymalloc ویژگی‌های زیر را دارد که به پایین نگه‌داشتن مصرف حافظه کمک می‌کنند: سربار کم به ازای هر بلوک تخصیص‌داده‌شده، جلوگیری مؤثر از تکه‌تکه شدن حافظه، و بازگرداندن سریع حافظه‌ی آزاد به سیستم‌عامل. تخصیص‌دهنده‌ی mimalloc نیز در این زمینه‌ها عملکرد بسیار خوبی دارد، اما ممکن است سربار بیشتری داشته باشد." msgid "In the free-threaded build, mimalloc manages memory in a number of separate heaps (currently four). For example, all GC supporting objects are allocated from their own heap. Using separate heaps means that free memory in one heap cannot be used for an allocation that uses another heap. Also, some heaps are configured to use QSBR (quiescent-state based reclamation) when freeing the memory that backs up the heap (known as \"pages\" in mimalloc terminology). The use of QSBR creates a delay between all memory blocks for a page being freed and the memory page being released, either for new allocations or back to the OS." msgstr "در ساخت نخ‌آزاد، mimalloc حافظه را در تعدادی هیپ جداگانه مدیریت می‌کند (در حال حاضر چهار). برای مثال، همه اشیایی که از GC پشتیبانی می‌کنند، از هیپ خودشان تخصیص داده می‌شوند. استفاده از هیپ‌های جداگانه به این معناست که حافظه آزاد در یک هیپ نمی‌تواند برای تخصیصی به‌کار رود که از هیپ دیگری استفاده می‌کند. همچنین، برخی هیپ‌ها به‌گونه‌ای پیکربندی شده‌اند که هنگام آزادسازی حافظه‌ای که زیربنای هیپ است (و در اصطلاح mimalloc به آن «page» گفته می‌شود)، از QSBR (بازپس‌گیری مبتنی بر حالت سکون) استفاده کنند. استفاده از QSBR بین آزاد شدن همه بلوک‌های حافظه یک صفحه و رهاسازی صفحه حافظه، چه برای تخصیص‌های جدید و چه برای بازگشت به سیستم‌عامل، تأخیر ایجاد می‌کند." msgid "The mimalloc allocator also defers returning freed memory back to the OS. You can reduce that delay by setting the environment variable :envvar:`!MIMALLOC_PURGE_DELAY` to ``0``. Note that this will likely reduce the performance of the allocator." msgstr "تخصیص‌دهنده‌ی mimalloc همچنین بازگرداندن حافظه‌ی آزادشده به سیستم‌عامل را به تعویق می‌اندازد. شما می‌توانید این تأخیر را با تنظیم متغیر محیطی :envvar:`!MIMALLOC_PURGE_DELAY` روی ``0`` کاهش دهید. توجه داشته باشید که این کار احتمالاً عملکرد تخصیص‌دهنده را کاهش می‌دهد." msgid "Free-threaded reference counting can cause objects to live longer" msgstr "شمارش ارجاع نخ‌آزاد می‌تواند باعث شود اشیاء بیشتر زنده بمانند" msgid "In the default build, when an object's reference count reaches zero, it is normally deallocated. The free-threaded build uses \"biased reference counting\", with a fast-path for objects \"owned\" by the current thread and a slow path for other objects. See :pep:`703` for additional details. Any time an object's reference count ends up in a \"queued\" state, deallocation can be deferred. The queued state is cleared from the \"eval breaker\" section of the bytecode evaluator." msgstr "در ساخت پیش‌فرض، وقتی شمار ارجاع یک شیء به صفر می‌رسد، آن شیء معمولاً آزاد می‌شود. ساخت نخ‌آزادی از «شمارش ارجاع سوگیرانه» (biased reference counting) استفاده می‌کند که دارای یک مسیر سریع برای اشیاء «متعلق» به نخ جاری و یک مسیر کند برای اشیاء دیگر است. برای جزئیات بیشتر :pep:`703` را ببینید. هر زمان که شمار ارجاع یک شیء در وضعیت «در صف» (queued) قرار گیرد، آزادسازی می‌تواند به تعویق بیفتد. وضعیت در صف از بخش «eval breaker» ارزیاب بایت‌کد پاک می‌شود." msgid "The free-threaded build also allows a different mode of reference counting, known as \"deferred reference counting\". This mode is enabled by setting a flag on a per-object basis. Deferred reference counting is enabled for the following types:" msgstr "ساخت نخ‌آزاد همچنین حالت متفاوتی از شمارش ارجاع را فراهم می‌کند که با نام «شمارش ارجاع معوق (deferred reference counting)» شناخته می‌شود. این حالت با تنظیم پرچمی به‌ازای هر شیء فعال می‌شود. شمارش ارجاع معوق برای انواع زیر فعال است:" msgid "module objects" msgstr "اشیای ماژول" msgid "module top-level functions" msgstr "توابع سطح بالای ماژول" msgid "class methods defined in the class scope" msgstr "متدهای کلاس تعریف‌شده در محدوده کلاس" msgid "descriptor objects" msgstr "اشیای توصیف‌گر" msgid "thread-local objects, created by :class:`threading.local`" msgstr "اشیای محلی نخ، ایجادشده توسط :class:`threading.local`" msgid "When deferred reference counting is enabled, references from Python function stacks are not added to the reference count. This scheme reduces the overhead of reference counting, especially for objects used from multiple threads. Because the stack references are not counted, objects with deferred reference counting are not immediately freed when their internal reference count goes to zero. Instead, they are examined by the next GC run and, if no stack references to them are found, they are freed. This means these objects are freed by the GC and not when their reference count goes to zero, as is typical." msgstr "هنگامی که شمارش ارجاع معوق (deferred reference counting) فعال باشد، ارجاع‌ها از پشته‌های تابع پایتون به شمار ارجاع‌ها افزوده نمی‌شوند. این سازوکار سربار شمارش ارجاع را کاهش می‌دهد، به‌ویژه برای اشیایی که توسط چندین نخ استفاده می‌شوند. از آن‌جا که ارجاع‌های پشته شمرده نمی‌شوند، اشیایی که شمارش ارجاع تعویقی دارند، هنگامی که شمار ارجاع داخلی آن‌ها به صفر می‌رسد، بلافاصله آزاد نمی‌شوند. در عوض، آن‌ها در اجرای بعدی زباله‌روبی بررسی می‌شوند و اگر هیچ ارجاعی از پشته به آن‌ها یافت نشود، آزاد می‌شوند. این یعنی این شیء‌ها به‌جای آزاد شدن مانند حالت معمول با صفر شدن شمار ارجاعشان، توسط زباله‌روبی آزاد می‌شوند." msgid "Per-thread reference counting can delay freeing objects" msgstr "شمارش ارجاع به‌ازای هر نخ می‌تواند آزادسازی اشیاء را به تأخیر بیندازد" msgid "To avoid contention on the reference count fields of frequently shared objects, the free-threaded build also uses \"per-thread reference counting\" for a few selected object types. Rather than updating a single shared reference count, each thread maintains its own local reference count array, indexed by a unique id assigned to the object. The true reference count is only computed by summing the per-thread counts when the object's local count drops to zero. Per-thread reference counting is currently used for:" msgstr "برای اجتناب از رقابت بر سر فیلدهای شمارش ارجاع اشیایی که به‌طور مکرر به اشتراک گذاشته می‌شوند، ساخت نخ‌آزاد نیز از «شمارش ارجاع به‌ازای هر نخ» برای چند نوع شیء انتخاب‌شده استفاده می‌کند. به‌جای به‌روزرسانی یک شمارش ارجاع مشترک واحد، هر نخ آرایه شمارش ارجاع محلی خود را نگه‌داری می‌کند؛ این آرایه با شناسه‌ای یکتا که به شیء اختصاص داده شده است، اندیس‌دهی می‌شود. شمارش ارجاع واقعی تنها زمانی با جمع‌کردن شمارش‌های به‌ازای هر نخ محاسبه می‌شود که شمارش محلی شیء به ۰ برسد. شمارش ارجاع به‌ازای هر نخ در حال حاضر برای موارد زیر استفاده می‌شود:" msgid "heap type objects (classes created in Python)" msgstr "اشیای نوع هیپ (کلاس‌های ایجادشده در پایتون)" msgid "code objects" msgstr "اشیای کد" msgid "the ``__dict__`` of module objects" msgstr "``__dict__`` اشیای ماژول" msgid "Because the per-thread counts must be merged back to the object before it can be deallocated, objects using per-thread reference counting are typically freed later than they would be in the default build. In particular, such an object is usually not freed until the thread that referenced it reaches a safe point (for example, in the \"eval breaker\" section of the bytecode evaluator) or exits. Running :func:`gc.collect` will merge the per-thread counts and allow these objects to be freed." msgstr "از آن‌جا که شمارش‌های ارجاع به‌ازای هر نخ باید پیش از امکان آزادسازی شیء، دوباره با آن ادغام شوند، اشیایی که از شمارش ارجاع به‌ازای هر نخ استفاده می‌کنند معمولاً دیرتر از زمانی آزاد می‌شوند که در ساخت پیش‌فرض آزاد می‌شدند. به‌ویژه، چنین شیء‌ای معمولاً تا زمانی آزاد نمی‌شود که نخی که به آن ارجاع داده است به یک نقطه امن برسد (برای مثال، در بخش «eval breaker» ارزیاب بایت‌کد) یا خارج شود. اجرای :func:`gc.collect` شمارش‌های ارجاع به‌ازای هر نخ را ادغام می‌کند و اجازه می‌دهد این اشیاء آزاد شوند."