@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.14\n "
1414"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2025-08-25 14:20 +0000\n "
15+ "POT-Creation-Date : 2025-08-29 14:17 +0000\n "
1616"PO-Revision-Date : 2025-08-02 17:33+0000\n "
1717"
Last-Translator :
Daniel Nylander <[email protected] >, 2025\n "
1818"Language-Team : Swedish (https://app.transifex.com/python-doc/teams/5390/ "
@@ -3701,20 +3701,23 @@ msgstr ""
37013701"CPython. De är avsedda att ersätta beroendet av :term:`global interpreter "
37023702"lock`, och är no-ops i versioner av Python med global interpreter lock."
37033703
3704+ msgid ""
3705+ "Critical sections are intended to be used for custom types implemented in C-"
3706+ "API extensions. They should generally not be used with built-in types like :"
3707+ "class:`list` and :class:`dict` because their public C-APIs already use "
3708+ "critical sections internally, with the notable exception of :c:func:"
3709+ "`PyDict_Next`, which requires critical section to be acquired externally."
3710+ msgstr ""
3711+
37043712msgid ""
37053713"Critical sections avoid deadlocks by implicitly suspending active critical "
3706- "sections and releasing the locks during calls to :c:func:"
3707- "`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the most "
3708- "recent critical section is resumed, and its locks reacquired. This means "
3709- "the critical section API provides weaker guarantees than traditional locks "
3710- "-- they are useful because their behavior is similar to the :term:`GIL`."
3711- msgstr ""
3712- "Kritiska sektioner undviker dödlägen genom att implicit avbryta aktiva "
3713- "kritiska sektioner och släppa låsen under anrop till :c:func:"
3714- "`PyEval_SaveThread`. När :c:func:`PyEval_RestoreThread` anropas återupptas "
3715- "den senaste kritiska sektionen och dess lås återfås. Detta innebär att API:"
3716- "et för kritiska avsnitt ger svagare garantier än traditionella lås -- de är "
3717- "användbara eftersom deras beteende liknar :term:`GIL`."
3714+ "sections, hence, they do not provide exclusive access such as provided by "
3715+ "traditional locks like :c:type:`PyMutex`. When a critical section is "
3716+ "started, the per-object lock for the object is acquired. If the code "
3717+ "executed inside the critical section calls C-API functions then it can "
3718+ "suspend the critical section thereby releasing the per-object lock, so other "
3719+ "threads can acquire the per-object lock for the same object."
3720+ msgstr ""
37183721
37193722msgid ""
37203723"Variants that accept :c:type:`PyMutex` pointers rather than Python objects "
0 commit comments