8000 [po] auto sync · python/python-docs-zh-cn@57f5a6a · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 57f5a6a

Browse files
[po] auto sync
1 parent 7dac9a3 commit 57f5a6a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "89.98%", "updated_at": "2024-01-24T03:09:16Z"}
1+
{"translation": "89.99%", "updated_at": "2024-01-24T08:09:58Z"}

c-api/init.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,13 +1020,18 @@ msgid ""
10201020
" are done, you should reset the thread state pointer, release the GIL, and "
10211021
"finally free the thread state data structure."
10221022
msgstr ""
1023+
"如果你需要从这些线程调用 Python 代码(这通常会是上述第三方库所提供的回调 API "
1024+
"的一部分),你必须首先通过创建线程状态数据结构体向解释器注册这些线程,然后获取 GIL,最后存储它们的线程状态指针,这样你才能开始使用 Python/C"
1025+
" API。 完成以上步骤后,你应当重置线程状态指针,释放 GIL,最后释放线程状态数据结构体。"
10231026

10241027
#: ../../c-api/init.rst:752
10251028
msgid ""
10261029
"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions "
10271030
"do all of the above automatically. The typical idiom for calling into "
10281031
"Python from a C thread is::"
10291032
msgstr ""
1033+
":c:func:`PyGILState_Ensure` 和 :c:func:`PyGILState_Release` 函数会自动完成上述的所有操作。 从"
1034+
" C 线程调用到 Python 的典型方式如下::"
10301035

10311036
#: ../../c-api/init.rst:766
10321037
msgid ""
@@ -1039,7 +1044,7 @@ msgstr ""
10391044

10401045
#: ../../c-api/init.rst:776
10411046
msgid "Cautions about fork()"
1042-
msgstr ""
1047+
msgstr "有关 fork() 的注意事项"
10431048

10441049
#: ../../c-api/init.rst:778
10451050
msgid ""
@@ -1049,6 +1054,9 @@ msgid ""
10491054
"concrete impact both on how locks must be handled and on all stored state in"
10501055
" CPython's runtime."
10511056
msgstr ""
1057+
"有关线程的另一个需要注意的重要问题是它们在面对 C :c:func:`fork` 调用时的行为。 在大多数支持 :c:func:`fork` "
1058+
"的系统中,当一个进程执行 fork 之后将只有发出 fork 的线程存在。 这对需要如何处理锁以及CPython "
1059+
"的运行时内所有的存储状态都会有实质性的影响。"
10521060

10531061
#: ../../c-api/init.rst:784
10541062
msgid ""

0 commit comments

Comments
 (0)
0