Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 07b3dc8

Browse files
[po] auto sync
1 parent f6bcfdc commit 07b3dc8

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "90.62%", "updated_at": "2024-01-24T03:23:09Z"}
1+
{"translation": "90.63%", "updated_at": "2024-01-24T08:25:18Z"}

c-api/init.po

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

10361039
#: ../../c-api/init.rst:752
10371040
msgid ""
10381041
"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions "
10391042
"do all of the above automatically. The typical idiom for calling into "
10401043
"Python from a C thread is::"
10411044
msgstr ""
1045+
":c:func:`PyGILState_Ensure` 和 :c:func:`PyGILState_Release` 函数会自动完成上述的所有操作。 从"
1046+
" C 线程调用到 Python 的典型方式如下::"
10421047

10431048
#: ../../c-api/init.rst:766
10441049
msgid ""
@@ -1051,7 +1056,7 @@ msgstr ""
10511056

10521057
#: ../../c-api/init.rst:776
10531058
msgid "Cautions about fork()"
1054-
msgstr ""
1059+
msgstr "有关 fork() 的注意事项"
10551060

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

10651073
#: ../../c-api/init.rst:784
10661074
msgid ""

0 commit comments

Comments
 (0)