@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.13\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2024-06-21 14:14 +0000\n "
14
+ "POT-Creation-Date : 2024-06-28 14:15 +0000\n "
15
15
"PO-Revision-Date : 2021-06-28 00:49+0000\n "
16
16
"Last-Translator : Maciej Olko <maciej.olko@gmail.com>, 2023\n "
17
17
"Language-Team : Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n "
@@ -467,8 +467,18 @@ msgid ""
467
467
"`Py_NewInterpreter` below) that were created and not yet destroyed since the "
468
468
"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory "
469
469
"allocated by the Python interpreter. This is a no-op when called for a "
470
- "second time (without calling :c:func:`Py_Initialize` again first). Normally "
471
- "the return value is ``0``. If there were errors during finalization "
470
+ "second time (without calling :c:func:`Py_Initialize` again first)."
471
+ msgstr ""
472
+
473
+ msgid ""
474
+ "Since this is the reverse of :c:func:`Py_Initialize`, it should be called in "
475
+ "the same thread with the same interpreter active. That means the main "
476
+ "thread and the main interpreter. This should never be called while :c:func:"
477
+ "`Py_RunMain` is running."
478
+ msgstr ""
479
+
480
+ msgid ""
481
+ "Normally the return value is ``0``. If there were errors during finalization "
472
482
"(flushing buffered data), ``-1`` is returned."
473
483
msgstr ""
474
484
@@ -2109,6 +2119,78 @@ msgid ""
2109
2119
"issue a fatal error."
2110
2120
msgstr ""
2111
2121
2122
+ msgid "Python Critical Section API"
2123
+ msgstr ""
2124
+
2125
+ msgid ""
2126
+ "The critical section API provides a deadlock avoidance layer on top of per-"
2127
+ "object locks for :term:`free-threaded <free threading>` CPython. They are "
2128
+ "intended to replace reliance on the :term:`global interpreter lock`, and are "
2129
+ "no-ops in versions of Python with the global interpreter lock."
2130
+ msgstr ""
2131
+
2132
+ msgid ""
2133
+ "Critical sections avoid deadlocks by implicitly suspending active critical "
2134
+ "sections and releasing the locks during calls to :c:func:"
2135
+ "`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the most "
2136
+ "recent critical section is resumed, and its locks reacquired. This means "
2137
+ "the critical section API provides weaker guarantees than traditional locks "
2138
+ "-- they are useful because their behavior is similar to the :term:`GIL`."
2139
+ msgstr ""
2140
+
2141
+ msgid ""
2142
+ "The functions and structs used by the macros are exposed for cases where C "
2143
+ "macros are not available. They should only be used as in the given macro "
2144
+ "expansions. Note that the sizes and contents of the structures may change in "
2145
+ "future Python versions."
2146
+ msgstr ""
2147
+
2148
+ msgid ""
2149
+ "Operations that need to lock two objects at once must use :c:macro:"
2150
+ "`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to "
2151
+ "lock more than one object at once, because the inner critical section may "
2152
+ "suspend the outer critical sections. This API does not provide a way to "
2153
+ "lock more than two objects at once."
2154
+ msgstr ""
2155
+
2156
+ msgid "Example usage::"
2157
+ msgstr ""
2158
+
2159
+ msgid ""
2160
+ "In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which "
2161
+ "can call arbitrary code through an object's deallocation function. The "
2162
+ "critical section API avoids potentital deadlocks due to reentrancy and lock "
2163
+ "ordering by allowing the runtime to temporarily suspend the critical section "
2164
+ "if the code triggered by the finalizer blocks and calls :c:func:"
2165
+ "`PyEval_SaveThread`."
2166
+ msgstr ""
2167
+
2168
+ msgid ""
2169
+ "Acquires the per-object lock for the object *op* and begins a critical "
2170
+ "section."
2171
+ msgstr ""
2172
+
2173
+ msgid "In the free-threaded build, this macro expands to::"
2174
+ msgstr ""
2175
+
2176
+ msgid "In the default build, this macro expands to ``{``."
2177
+ msgstr ""
2178
+
2179
+ msgid "Ends the critical section and releases the per-object lock."
2180
+ msgstr ""
2181
+
2182
+ msgid "In the default build, this macro expands to ``}``."
2183
+ msgstr ""
2184
+
2185
+ msgid ""
2186
+ "Acquires the per-objects locks for the objects *a* and *b* and begins a "
2187
+ "critical section. The locks are acquired in a consistent order (lowest "
2188
+ "address first) to avoid lock ordering deadlocks."
2189
+ msgstr ""
2190
+
2191
+ msgid "Ends the critical section and releases the per-object locks."
2192
+ msgstr ""
2193
+
2112
2194
msgid "PyEval_InitThreads()"
2113
2195
msgstr ""
2114
2196
0 commit comments