-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathsynchronization.po
More file actions
243 lines (185 loc) · 20.6 KB
/
Copy pathsynchronization.po
File metadata and controls
243 lines (185 loc) · 20.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# Persian translations for Python package.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# Automatically generated, 2026.
#
# Translators:
# Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-14 12:55+0330\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
"Language-Team: none\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"
msgid "Synchronization primitives"
msgstr "اولیههای همگامسازی"
msgid "The C-API provides a basic mutual exclusion lock."
msgstr "API زبان C یک قفل متقابل پایهای فراهم میکند."
msgid "A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to zero to represent the unlocked state. For example::"
msgstr "قفل متقابل. :c:type:`!PyMutex` باید برای نمایش وضعیت باز، با مقدار صفر مقداردهی اولیه شود. برای مثال::"
msgid "PyMutex mutex = {0};"
msgstr "PyMutex mutex = {0};"
msgid "Instances of :c:type:`!PyMutex` should not be copied or moved. Both the contents and address of a :c:type:`!PyMutex` are meaningful, and it must remain at a fixed, writable location in memory."
msgstr "نباید نمونههای :c:type:`!PyMutex` کپی یا منتقل شوند. هم محتویات و هم آدرس یک :c:type:`!PyMutex` معنادار هستند و باید در مکانی ثابت و قابلنوشتن در حافظه باقی بماند."
msgid "A :c:type:`!PyMutex` currently occupies one byte, but the size should be considered unstable. The size may change in future Python releases without a deprecation period."
msgstr ":c:type:`!PyMutex` در حال حاضر یک بایت فضا اشغال میکند، اما اندازهی آن باید ناپاید در نظر گرفته شود. این اندازه ممکن است در نسخههای آیندهی پایتون بدون دورهی منسوخشدن تغییر کند."
msgid "Lock mutex *m*. If another thread has already locked it, the calling thread will block until the mutex is unlocked. While blocked, the thread will temporarily detach the :term:`thread state <attached thread state>` if one exists."
msgstr "قفل متقابل *m* را قفل میکند. اگر نخ دیگری از قبل آن را قفل کرده باشد، نخ فراخواننده تا زمانی که قفل متقابل باز شود، مسدود خواهد شد. در حال مسدود بودن، نخ :term:`وضعیت نخ <attached thread state>` را در صورت وجود بهطور موقت جدا خواهد کرد."
msgid "Unlock mutex *m*. The mutex must be locked --- otherwise, the function will issue a fatal error."
msgstr "قفل متقابل *m* را باز میکند. قفل متقابل باید در حالت قفلشده باشد --- در غیر این صورت، تابع خطای مهلک صادر خواهد کرد."
msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise."
msgstr "اگر قفل متقابل *m* در حال حاضر قفل شده باشد، مقدار غیرصفر و در غیر این صورت صفر برمیگرداند."
msgid "This function is intended for use in assertions and debugging only and should not be used to make concurrency control decisions, as the lock state may change immediately after the check."
msgstr "این تابع فقط برای استفاده در ادعاها و اشکالزدایی در نظر گرفته شده است و نباید برای تصمیمگیریهای کنترل همزمانی به کار رود، زیرا وضعیت قفل ممکن است بلافاصله پس از بررسی تغییر کند."
msgid "Python critical section API"
msgstr "API بخش بحرانی پایتون"
msgid "The critical section API provides a deadlock avoidance layer on top of per-object locks for :term:`free-threaded <free threading>` CPython. They are intended to replace reliance on the :term:`global interpreter lock`, and are no-ops in versions of Python with the global interpreter lock."
msgstr "برای سیپایتونِ :term:`نخآزاد <free threading>`، API بخش بحرانی یک لایهی اجتناب از بنبست بر روی قفلهای بهازای هر شیء فراهم میکند. آنها در نظر گرفته شدهاند تا اتکا به :term:`قفل مفسر سراسری <global interpreter lock>` را جایگزین کنند، و در نسخههای پایتونی که قفل مفسر سراسری را دارند، عملیات بیاثر هستند."
msgid "Critical sections are intended to be used for custom types implemented in C-API extensions. They should generally not be used with built-in types like :class:`list` and :class:`dict` because their public C-APIs already use critical sections internally, with the notable exception of :c:func:`PyDict_Next`, which requires critical section to be acquired externally."
msgstr "بخشهای بحرانی برای استفاده در نوعهای سفارشی پیادهسازیشده در توسعههای C-API در نظر گرفته شدهاند. بهطور کلی نباید از آنها با نوعهای توکار مانند :class:`list` و :class:`dict` استفاده کرد، زیرا C-APIهای عمومی آنها از پیش بهطور داخلی از بخشهای بحرانی استفاده میکنند؛ با این استثنای قابل توجه که :c:func:`PyDict_Next` برای آن باید بخش بحرانی از بیرون به دست گرفته شود."
msgid "Critical sections avoid deadlocks by implicitly suspending active critical sections, hence, they do not provide exclusive access such as provided by traditional locks like :c:type:`PyMutex`. When a critical section is started, the per-object lock for the object is acquired. If the code executed inside the critical section calls C-API functions then it can suspend the critical section thereby releasing the per-object lock, so other threads can acquire the per-object lock for the same object."
msgstr "بخشهای بحرانی با تعلیق ضمنی بخشهای بحرانی فعال از بنبست اجتناب میکنند؛ از این رو، آنها دسترسی انحصاریای از نوع آنچه قفلهای سنتی مانند :c:type:`PyMutex` فراهم میکنند را ارائه نمیدهند. هنگامی که یک بخش بحرانی آغاز میشود، قفل هر شیء برای آن شیء به دست گرفته میشود. اگر کدی که درون بخش بحرانی اجرا میشود توابع C-API را فراخوانی کند، میتواند بخش بحرانی را معلق کند و بدین ترتیب قفل هر شیء را آزاد کند تا نخهای دیگر بتوانند قفل هر شیء را برای همان شیء به دست آورند."
msgid "Variants that accept :c:type:`PyMutex` pointers rather than Python objects are also available. Use these variants to start a critical section in a situation where there is no :c:type:`PyObject` -- for example, when working with a C type that does not extend or wrap :c:type:`PyObject` but still needs to call into the C API in a manner that might lead to deadlocks."
msgstr "گونههایی نیز موجود هستند که بهجای اشیاء پایتون، اشارهگرهای :c:type:`PyMutex` را میپذیرند. از این گونهها برای آغاز یک بخش بحرانی در موقعیتی که :c:type:`PyObject` وجود ندارد استفاده کنید -- برای مثال، هنگام کار با یک نوع C که :c:type:`PyObject` را بسط نمیدهد یا دربر نمیگیرد، اما همچنان باید به شکلی که ممکن است به بنبست منجر شود، در API زبان C فراخوانی انجام دهد."
msgid "The functions and structs used by the macros are exposed for cases where C macros are not available. They should only be used as in the given macro expansions. Note that the sizes and contents of the structures may change in future Python versions."
msgstr "توابع و ساختارهایی که ماکروها از آنها استفاده میکنند، برای مواردی که ماکروهای C موجود نیستند، در دسترس قرار گرفتهاند. از آنها باید فقط مطابق با بسطهای دادهشدهی ماکروها استفاده شود. توجه داشته باشید که اندازه و محتویات ساختارها ممکن است در نسخههای آینده پایتون تغییر کنند."
msgid "Operations that need to lock two objects at once must use :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to lock more than one object at once, because the inner critical section may suspend the outer critical sections. This API does not provide a way to lock more than two objects at once."
msgstr "عملیاتی که نیاز به قفل کردن دو شیء بهطور همزمان دارند، باید از :c:macro:`Py_BEGIN_CRITICAL_SECTION2` استفاده کنند. شما *نمیتوانید* از بخشهای بحرانی تودرتو برای قفل کردن بیش از یک شیء بهطور همزمان استفاده کنید، زیرا بخش بحرانی داخلی ممکن است بخشهای بحرانی خارجی را تعلیق کند. این API راهی برای قفل کردن بیش از دو شیء بهطور همزمان فراهم نمیکند."
msgid "Example usage::"
msgstr "مثال استفاده::"
msgid ""
"static PyObject *\n"
"set_field(MyObject *self, PyObject *value)\n"
"{\n"
" Py_BEGIN_CRITICAL_SECTION(self);\n"
" Py_SETREF(self->field, Py_XNewRef(value));\n"
" Py_END_CRITICAL_SECTION();\n"
" Py_RETURN_NONE;\n"
"}"
msgstr ""
"static PyObject *\n"
"set_field(MyObject *self, PyObject *value)\n"
"{\n"
" Py_BEGIN_CRITICAL_SECTION(self);\n"
" Py_SETREF(self->field, Py_XNewRef(value));\n"
" Py_END_CRITICAL_SECTION();\n"
" Py_RETURN_NONE;\n"
"}"
msgid "In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which can call arbitrary code through an object's deallocation function. The critical section API avoids potential deadlocks due to reentrancy and lock ordering by allowing the runtime to temporarily suspend the critical section if the code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`."
msgstr "در مثال بالا، :c:macro:`Py_SETREF` :c:macro:`Py_DECREF` را فراخوانی میکند که میتواند از طریق تابع آزادسازی یک شیء، کد دلخواهی را فراخوانی کند. API بخش بحرانی با اجازه دادن به رانتایم تا در صورتی که کد راهاندازیشده توسط نهاییساز مسدود شود و :c:func:`PyEval_SaveThread` را فراخوانی کند، بخش بحرانی را بهطور موقت معلق کند، از بنبستهای احتمالی ناشی از بازورودپذیری و ترتیب قفلها جلوگیری میکند."
msgid "Acquires the per-object lock for the object *op* and begins a critical section."
msgstr "قفل مخصوص هر شیء را برای شیء *op* به دست میآورد و یک بخش بحرانی را آغاز میکند."
msgid "In the free-threaded build, this macro expands to::"
msgstr "در ساخت نخآزاد، این ماکرو به صورت زیر بسط مییابد::"
msgid ""
"{\n"
" PyCriticalSection _py_cs;\n"
" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))"
msgstr ""
"{\n"
" PyCriticalSection _py_cs;\n"
" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))"
msgid "In the default build, this macro expands to ``{``."
msgstr "در ساخت پیشفرض، این ماکرو به ``{`` بسط داده میشود."
msgid "Locks the mutex *m* and begins a critical section."
msgstr "قفل متقابل *m* را قفل میکند و یک بخش بحرانی را آغاز میکند."
msgid ""
"{\n"
" PyCriticalSection _py_cs;\n"
" PyCriticalSection_BeginMutex(&_py_cs, m)"
msgstr ""
"{\n"
" PyCriticalSection _py_cs;\n"
" PyCriticalSection_BeginMutex(&_py_cs, m)"
msgid "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for the argument of the macro - it must be a :c:type:`PyMutex` pointer."
msgstr "توجه داشته باشید که برخلاف :c:macro:`Py_BEGIN_CRITICAL_SECTION`، برای آرگومان این ماکرو هیچ قالبریزی وجود ندارد؛ این آرگومان باید اشارهگری به :c:type:`PyMutex` باشد."
msgid "On the default build, this macro expands to ``{``."
msgstr "در ساخت پیشفرض، این ماکرو به ``{`` بسط مییابد."
msgid "Ends the critical section and releases the per-object lock."
msgstr "بخش بحرانی را به پایان میرساند و قفل به ازای هر شیء را آزاد میکند."
msgid ""
" PyCriticalSection_End(&_py_cs);\n"
"}"
msgstr ""
" PyCriticalSection_End(&_py_cs);\n"
"}"
msgid "In the default build, this macro expands to ``}``."
msgstr "در ساخت پیشفرض، این ماکرو به ``}`` بسط مییابد."
msgid "Acquires the per-object locks for the objects *a* and *b* and begins a critical section. The locks are acquired in a consistent order (lowest address first) to avoid lock ordering deadlocks."
msgstr "قفلهای بهازای هر شیء را برای اشیاء *a* و *b* بهدست میگیرد و یک بخش بحرانی را آغاز میکند. قفلها با ترتیبی ثابت (ابتدا کمترین نشانی) بهدست گرفته میشوند تا از بنبستهای ناشی از ترتیب قفلگیری جلوگیری شود."
msgid ""
"{\n"
" PyCriticalSection2 _py_cs2;\n"
" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
msgstr ""
"{\n"
" PyCriticalSection2 _py_cs2;\n"
" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
msgid "Locks the mutexes *m1* and *m2* and begins a critical section."
msgstr "قفلهای متقابل *m1* و *m2* را قفل میکند و یک بخش بحرانی را آغاز میکند."
msgid ""
"{\n"
" PyCriticalSection2 _py_cs2;\n"
" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)"
msgstr ""
"{\n"
" PyCriticalSection2 _py_cs2;\n"
" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)"
msgid "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for the arguments of the macro - they must be :c:type:`PyMutex` pointers."
msgstr "توجه داشته باشید که برخلاف :c:macro:`Py_BEGIN_CRITICAL_SECTION2`، هیچ تبدیل نوعی برای آرگومانهای ماکرو انجام نمیشود — این آرگومانها باید اشارهگرهای :c:type:`PyMutex` باشند."
msgid "Ends the critical section and releases the per-object locks."
msgstr "بخش بحرانی را به پایان میرساند و قفلهای هر شیء را آزاد میکند."
msgid ""
" PyCriticalSection2_End(&_py_cs2);\n"
"}"
msgstr ""
" PyCriticalSection2_End(&_py_cs2);\n"
"}"
msgid "Legacy locking APIs"
msgstr "APIهای قدیمی قفلگذاری"
msgid "These APIs are obsolete since Python 3.13 with the introduction of :c:type:`PyMutex`."
msgstr "این APIها با معرفی :c:type:`PyMutex` در پایتون 3.13 منسوخ شدهاند."
msgid "A pointer to a mutual exclusion lock."
msgstr "اشارهگری به قفل متقابل."
msgid "The result of acquiring a lock with a timeout."
msgstr "نتیجهی بهدست آوردن یک قفل با مهلت زمانی."
msgid "Failed to acquire the lock."
msgstr "بهدست آوردن قفل ناموفق بود."
msgid "The lock was successfully acquired."
msgstr "قفل با موفقیت به دست آمد."
msgid "The lock was interrupted by a signal."
msgstr "قفل توسط یک سیگنال مختل شد."
msgid "Allocate a new lock."
msgstr "یک قفل جدید تخصیص میدهد."
msgid "On success, this function returns a lock; on failure, this function returns ``0`` without an exception set."
msgstr "در صورت موفقیت، این تابع یک قفل برمیگرداند؛ در صورت شکست، این تابع ``0`` را بدون تنظیم استثنا برمیگرداند."
msgid "The caller does not need to hold an :term:`attached thread state`."
msgstr "فراخواننده نیازی به در اختیار داشتن :term:`وضعیت نخ متصل <attached thread state>` ندارد."
msgid "Destroy *lock*. The lock should not be held by any thread when calling this."
msgstr "قفل *lock* را از بین میبرد. هنگام فراخوانی این تابع، قفل نباید در اختیار هیچ نخی باشد."
msgid "Acquire *lock* with a timeout."
msgstr "بهدست آوردن *lock* با مهلت زمانی."
msgid "This will wait for *microseconds* microseconds to acquire the lock. If the timeout expires, this function returns :c:enumerator:`PY_LOCK_FAILURE`. If *microseconds* is ``-1``, this will wait indefinitely until the lock has been released."
msgstr "این تابع برای بهدست آوردن قفل به مدت *microseconds* میکروثانیه منتظر میماند. اگر مهلت زمانی به پایان برسد، این تابع :c:enumerator:`PY_LOCK_FAILURE` را برمیگرداند. اگر *microseconds* برابر ``-1`` باشد، این تابع بهطور نامحدود تا زمانی که قفل آزاد شود منتظر میماند."
msgid "If *intr_flag* is ``1``, acquiring the lock may be interrupted by a signal, in which case this function returns :c:enumerator:`PY_LOCK_INTR`. Upon interruption, it's generally expected that the caller makes a call to :c:func:`Py_MakePendingCalls` to propagate an exception to Python code."
msgstr "اگر *intr_flag* برابر ``1`` باشد، ممکن است بهدستآوردن قفل توسط یک سیگنال مختل شود که در این صورت این تابع :c:enumerator:`PY_LOCK_INTR` را برمیگرداند. پس از وقوع اختلال، معمولاً انتظار میرود که فراخواننده :c:func:`Py_MakePendingCalls` را فراخوانی کند تا استثنی را به کد پایتون منتشر کند."
msgid "If the lock is successfully acquired, this function returns :c:enumerator:`PY_LOCK_ACQUIRED`."
msgstr "اگر قفل با موفقیت به دست آید، این تابع :c:enumerator:`PY_LOCK_ACQUIRED` را برمیگرداند."
msgid "Acquire *lock*."
msgstr "*lock* را به دست بگیرید."
msgid "If *waitflag* is ``1`` and another thread currently holds the lock, this function will wait until the lock can be acquired and will always return ``1``."
msgstr "اگر *waitflag* برابر ``1`` باشد و در حال حاضر نخ دیگری قفل را در اختیار داشته باشد، این تابع تا زمانی که بتوان قفل را به دست آورد منتظر میماند و همیشه ``1`` را برمیگرداند."
msgid "If *waitflag* is ``0`` and another thread holds the lock, this function will not wait and instead return ``0``. If the lock is not held by any other thread, then this function will acquire it and return ``1``."
msgstr "اگر *waitflag* برابر ``0`` باشد و نخ دیگری قفل را در اختیار داشته باشد، این تابع منتظر نمیماند و در عوض ``0`` را برمیگرداند. اگر هیچ نخ دیگری قفل را در اختیار نداشته باشد، این تابع آن را به دست میآورد و ``1`` را برمیگرداند."
msgid "Unlike :c:func:`PyThread_acquire_lock_timed`, acquiring the lock cannot be interrupted by a signal."
msgstr "برخلاف :c:func:`PyThread_acquire_lock_timed`، بهدستآوردن قفل نمیتواند توسط سیگنال مختل شود."
msgid "Release *lock*. If *lock* is not held, then this function issues a fatal error."
msgstr "*lock* را آزاد میکند. اگر *lock* نگه داشته نشده باشد، این تابع خطای مهلک صادر میکند."