@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.14\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-08-27 14:18 +0000\n "
14
+ "POT-Creation-Date : 2025-08-29 14:17 +0000\n "
15
15
"PO-Revision-Date : 2025-08-02 17:33+0000\n "
16
16
"Last-Translator : python-doc bot, 2025\n "
17
17
"Language-Team : Indonesian (https://app.transifex.com/python-doc/teams/5390/ "
@@ -2928,13 +2928,22 @@ msgid ""
2928
2928
"no-ops in versions of Python with the global interpreter lock."
2929
2929
msgstr ""
2930
2930
2931
+ msgid ""
2932
+ "Critical sections are intended to be used for custom types implemented in C-"
2933
+ "API extensions. They should generally not be used with built-in types like :"
2934
+ "class:`list` and :class:`dict` because their public C-APIs already use "
2935
+ "critical sections internally, with the notable exception of :c:func:"
2936
+ "`PyDict_Next`, which requires critical section to be acquired externally."
2937
+ msgstr ""
2938
+
2931
2939
msgid ""
2932
2940
"Critical sections avoid deadlocks by implicitly suspending active critical "
2933
- "sections and releasing the locks during calls to :c:func:"
2934
- "`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the most "
2935
- "recent critical section is resumed, and its locks reacquired. This means "
2936
- "the critical section API provides weaker guarantees than traditional locks "
2937
- "-- they are useful because their behavior is similar to the :term:`GIL`."
2941
+ "sections, hence, they do not provide exclusive access such as provided by "
2942
+ "traditional locks like :c:type:`PyMutex`. When a critical section is "
2943
+ "started, the per-object lock for the object is acquired. If the code "
2944
+ "executed inside the critical section calls C-API functions then it can "
2945
+ "suspend the critical section thereby releasing the per-object lock, so other "
2946
+ "threads can acquire the per-object lock for the same object."
2938
2947
msgstr ""
2939
2948
2940
2949
msgid ""
0 commit comments