GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-docs-ja/c-api/synchronization.po at 3.14 · python/python-docs-ja Expand file tree/ Copy pathsynchronization.poMore file actions 479 lines (414 loc) · 20.3 KB / Copy pathsynchronization.poFile metadata and controls479 lines (414 loc) · 20.3 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # # Translators: # python-doc bot, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-10-01 19:07+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../c-api/synchronization.rst:6 msgid "Synchronization primitives" msgstr "同期プリミティブ" msgid "The C-API provides a basic mutual exclusion lock." msgstr "C API は基本的な相互排他ロックを提供します。" msgid "" "A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " "zero to represent the unlocked state. For example::" msgstr "" "相互排他ロックです。\n" ":c:type:`!PyMutex` は、ロックされていない状態を表すために 0 で初期化する必要" "があります。\n" "例えば次のようにします。 ::" msgid "PyMutex mutex = {0};" msgstr "PyMutex mutex = {0};" msgid "" "Instances of :c:type:`!PyMutex` should not be copied or moved. Both the " "contents and address of a :c:type:`!PyMutex` are meaningful, and it must " "remain at a fixed, writable location in memory." msgstr "" ":c:type:`!PyMutex` のインスタンスは、コピーしたり移動したりしてはなりませ" "ん。\n" ":c:type:`!PyMutex` は内容とアドレスの両方が意味を持つため、書き込み可能なメモ" "リ上の固定された場所に置き続ける必要があります。" msgid "" "A :c:type:`!PyMutex` currently occupies one byte, but the size should be " "considered unstable. The size may change in future Python releases without " "a deprecation period." msgstr "" ":c:type:`!PyMutex` は現在 1 バイトを占めますが、このサイズは安定した仕様では" "ありません。\n" "将来の Python リリースでは、非推奨の期間を設けずにサイズを変更する可能性があ" "ります。" msgid "" "Lock mutex *m*. If another thread has already locked it, the calling thread " "will block until the mutex is unlocked. While blocked, the thread will " "temporarily detach the :term:`thread state <attached thread state>` if one " "exists." msgstr "" "ミューテックス *m* をロックします。\n" "別のスレッドがすでにロックしている場合、呼び出し元のスレッドはロックが解除さ" "れるまでブロックします。\n" "ブロック中は、:term:`スレッド状態 <attached thread state>` があれば一時的にデ" "タッチします。" msgid "" "Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " "issue a fatal error." msgstr "" "ミューテックス *m* のロックを解除します。\n" "ミューテックスはロックされていなければなりません。\n" "ロックされていない場合、この関数は致命的なエラーを発生させます。" msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." msgstr "" "ミューテックス *m* が現在ロックされていれば 0 以外を、そうでなければ 0 を返し" "ます。" msgid "" "This function is intended for use in assertions and debugging only and " "should not be used to make concurrency control decisions, as the lock state " "may change immediately after the check." msgstr "" "この関数はアサーションとデバッグだけを目的としています。\n" "確認した直後にロックの状態が変わる可能性があるため、並行処理の制御の判断には" "使わないでください。" msgid "Python critical section API" msgstr "Python のクリティカルセクション API" msgid "" "The critical section API provides a deadlock avoidance layer on top of per-" "object locks for :term:`free-threaded <free threading>` CPython. They are " "intended to replace reliance on the :term:`global interpreter lock`, and are " "no-ops in versions of Python with the global interpreter lock." msgstr "" "クリティカルセクション API は、:term:`フリースレッドの <free threading>` " "CPython のオブジェクトごとのロックに、デッドロックを避ける層を加えます。\n" ":term:`グローバルインタープリタロック <global interpreter lock>` への依存を置" "き換えるためのもので、グローバルインタープリタロックを持つバージョンの " "Python では何もしません。" msgid "" "Critical sections are intended to be used for custom types implemented in C-" "API extensions. They should generally not be used with built-in types " "like :class:`list` and :class:`dict` because their public C-APIs already use " "critical sections internally, with the notable exception " "of :c:func:`PyDict_Next`, which requires critical section to be acquired " "externally." msgstr "" "クリティカルセクションは、C API を使う拡張で実装した独自の型のためのもので" "す。\n" ":class:`list` や :class:`dict` などの組み込み型の公開 C API は内部でクリティ" "カルセクションを使っているため、通常はこれらの型に対して使わないでくださ" "い。\n" "重要な例外は :c:func:`PyDict_Next` で、外側でクリティカルセクションを開始して" "おく必要があります。" msgid "" "Critical sections avoid deadlocks by implicitly suspending active critical " "sections, hence, they do not provide exclusive access such as provided by " "traditional locks like :c:type:`PyMutex`. When a critical section is " "started, the per-object lock for the object is acquired. If the code " "executed inside the critical section calls C-API functions then it can " "suspend the critical section thereby releasing the per-object lock, so other " "threads can acquire the per-object lock for the same object." msgstr "" "クリティカルセクションは、実行中のクリティカルセクションを暗黙的に中断するこ" "とでデッドロックを避けます。\n" "そのため、:c:type:`PyMutex` のような従来のロックが提供する排他的アクセスとは" "異なります。\n" "クリティカルセクションを開始すると、対象のオブジェクトのロックを取得しま" "す。\n" "内部で実行するコードが C API 関数を呼ぶと、クリティカルセクションを中断してそ" "のロックを解放する場合があります。\n" "すると、別のスレッドが同じオブジェクトのロックを取得できます。" msgid "" "Variants that accept :c:type:`PyMutex` pointers rather than Python objects " "are also available. Use these variants to start a critical section in a " "situation where there is no :c:type:`PyObject` -- for example, when working " "with a C type that does not extend or wrap :c:type:`PyObject` but still " "needs to call into the C API in a manner that might lead to deadlocks." msgstr "" "Python オブジェクトの代わりに :c:type:`PyMutex` ポインタを受け取る形式もあり" "ます。\n" ":c:type:`PyObject` がない状況でクリティカルセクションを開始する場合に使ってく" "ださい。\n" "例えば、:c:type:`PyObject` を拡張もラップもしていない C の型を扱うものの、" "デッドロックを起こす可能性がある形で C API を呼び出す必要がある場合です。" msgid "" "Operations that need to lock two objects at once must " "use :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical " "sections to lock more than one object at once, because the inner critical " "section may suspend the outer critical sections. This API does not provide " "a way to lock more than two objects at once." msgstr "" "2 個のオブジェクトを同時にロックする操作に" "は、:c:macro:`Py_BEGIN_CRITICAL_SECTION2` を使う必要があります。\n" "複数のオブジェクトを同時にロックするために、クリティカルセクションを入れ子に" "することは *できません*。\n" "内側のクリティカルセクションが外側のものを中断する場合があるためです。\n" "この API は、3 個以上のオブジェクトを同時にロックする方法を提供しません。" #: ../../c-api/synchronization.rst:95 msgid "Example usage::" msgstr "使用例::" msgid "" "static PyObject *\n" "set_field(MyObject *self, PyObject *value)\n" "{\n" " Py_BEGIN_CRITICAL_SECTION(self);\n" " Py_SETREF(self->field, Py_XNewRef(value));\n" " Py_END_CRITICAL_SECTION();\n" " Py_RETURN_NONE;\n" "}" msgstr "" "static PyObject *\n" "set_field(MyObject *self, PyObject *value)\n" "{\n" " Py_BEGIN_CRITICAL_SECTION(self);\n" " Py_SETREF(self->field, Py_XNewRef(value));\n" " Py_END_CRITICAL_SECTION();\n" " Py_RETURN_NONE;\n" "}" msgid "" "In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which " "can call arbitrary code through an object's deallocation function. The " "critical section API avoids potential deadlocks due to reentrancy and lock " "ordering by allowing the runtime to temporarily suspend the critical section " "if the code triggered by the finalizer blocks and " "calls :c:func:`PyEval_SaveThread`." msgstr "" "上の例では、:c:macro:`Py_SETREF` が :c:macro:`Py_DECREF` を呼び出し、オブジェ" "クトの解放関数を通じて任意のコードが実行される可能性があります。\n" "ファイナライザが実行するコードがブロックして :c:func:`PyEval_SaveThread` を呼" "び出した場合、\n" "クリティカルセクション API はランタイムによるクリティカルセクションの一時的な" "中断を許すことで、再入やロックの順序に起因するデッドロックを避けます。" msgid "" "Acquires the per-object lock for the object *op* and begins a critical " "section." msgstr "" "オブジェクト *op* のロックを取得し、クリティカルセクションを開始します。" msgid "" "In the free-threaded build, and when building for the :ref:`Stable ABI " "<stable-abi>`, this macro expands to::" msgstr "" "フリースレッドビルドや :ref:`Stable ABI <stable-abi>` 向けのビルドでは、この" "マクロは次のように展開されます。 ::" msgid "" "{\n" " PyCriticalSection _py_cs;\n" " PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" msgstr "" "{\n" " PyCriticalSection _py_cs;\n" " PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" msgid "In the default build, this macro expands to ``{``." msgstr "デフォルトのビルドでは、このマクロは ``{`` に展開されます。" msgid "Locks the mutex *m* and begins a critical section." msgstr "ミューテックス *m* をロックし、クリティカルセクションを開始します。" msgid "In the free-threaded build, this macro expands to::" msgstr "フリースレッドビルドでは、このマクロは次のように展開されます。 ::" msgid "" "{\n" " PyCriticalSection _py_cs;\n" " PyCriticalSection_BeginMutex(&_py_cs, m)" msgstr "" "{\n" " PyCriticalSection _py_cs;\n" " PyCriticalSection_BeginMutex(&_py_cs, m)" msgid "" "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for " "the argument of the macro - it must be a :c:type:`PyMutex` pointer." msgstr "" ":c:macro:`Py_BEGIN_CRITICAL_SECTION` と異なり、このマクロは引数をキャストしま" "せん。\n" "引数は :c:type:`PyMutex` ポインタでなければなりません。" msgid "On the default build, this macro expands to ``{``." msgstr "デフォルトのビルドでは、このマクロは ``{`` に展開されます。" msgid "Ends the critical section and releases the per-object lock." msgstr "クリティカルセクションを終了し、オブジェクトのロックを解放します。" msgid "" " PyCriticalSection_End(&_py_cs);\n" "}" msgstr "" " PyCriticalSection_End(&_py_cs);\n" "}" msgid "In the default build, this macro expands to ``}``." msgstr "デフォルトのビルドでは、このマクロは ``}`` に展開されます。" msgid "" "Acquires the per-object locks for the objects *a* and *b* and begins a " "critical section. The locks are acquired in a consistent order (lowest " "address first) to avoid lock ordering deadlocks." msgstr "" "オブジェクト *a* と *b* のロックを取得し、クリティカルセクションを開始しま" "す。\n" "ロックの順序によるデッドロックを避けるため、常に同じ順序 (アドレスが小さいも" "のから) でロックを取得します。" msgid "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" msgstr "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" msgid "Locks the mutexes *m1* and *m2* and begins a critical section." msgstr "" "ミューテックス *m1* と *m2* をロックし、クリティカルセクションを開始します。" msgid "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)" msgstr "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)" msgid "" "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for " "the arguments of the macro - they must be :c:type:`PyMutex` pointers." msgstr "" ":c:macro:`Py_BEGIN_CRITICAL_SECTION2` と異なり、このマクロは引数をキャストし" "ません。\n" "引数は :c:type:`PyMutex` ポインタでなければなりません。" msgid "Ends the critical section and releases the per-object locks." msgstr "クリティカルセクションを終了し、オブジェクトのロックを解放します。" msgid "" " PyCriticalSection2_End(&_py_cs2);\n" "}" msgstr "" " PyCriticalSection2_End(&_py_cs2);\n" "}" msgid "Low-level critical section API" msgstr "低水準のクリティカルセクション API" msgid "" "The following functions and structs are exposed for cases where C macros are " "not available." msgstr "C のマクロを使えない場合のために、次の関数と構造体が公開されています。" msgid "" "To be used only as in the macro expansions listed :ref:`earlier in this " "section <critical-section-macros>`." msgstr "" ":ref:`この節の前半 <critical-section-macros>` に示したマクロの展開と同じ形で" "のみ使ってください。" msgid "" "In non-:term:`free-threaded <free threading>` builds of CPython, these " "functions do nothing." msgstr "" ":term:`フリースレッド <free threading>` ではない CPython のビルドでは、これら" "の関数は何もしません。" msgid "" "To be used only as in the macro expansions listed :ref:`earlier in this " "section <critical-section-macros>`. Note that the contents of the structures " "are private and their meaning may change in future Python versions." msgstr "" ":ref:`この節の前半 <critical-section-macros>` に示したマクロの展開と同じ形で" "のみ使ってください。\n" "構造体の内容は非公開で、その意味は将来の Python バージョンで変わる可能性があ" "ります。" msgid "Legacy locking APIs" msgstr "従来のロック API" msgid "" "These APIs are obsolete since Python 3.13 with the introduction " "of :c:type:`PyMutex`." msgstr "" "これらの API は、Python 3.13 で :c:type:`PyMutex` が導入されたことにより旧式" "となりました。" msgid "These APIs are now a simple wrapper around ``PyMutex``." msgstr "これらの API は、``PyMutex`` を単純にラップするものになりました。" msgid "A pointer to a mutual exclusion lock." msgstr "相互排他ロックへのポインタです。" msgid "The result of acquiring a lock with a timeout." msgstr "タイムアウト付きでロックを取得した結果です。" msgid "Failed to acquire the lock." msgstr "ロックを取得できませんでした。" msgid "The lock was successfully acquired." msgstr "ロックを取得しました。" msgid "The lock was interrupted by a signal." msgstr "ロックの取得がシグナルで中断されました。" msgid "Allocate a new lock." msgstr "新しいロックを確保します。" msgid "" "On success, this function returns a lock; on failure, this function returns " "``0`` without an exception set." msgstr "" "成功するとロックを返します。\n" "失敗すると、例外を設定せずに ``0`` を返します。" msgid "The caller does not need to hold an :term:`attached thread state`." msgstr "" "呼び出し元に :term:`スレッド状態がアタッチされている <attached thread " "state>` 必要はありません。" msgid "" "This function now always uses :c:type:`PyMutex`. In prior versions, this " "would use a lock provided by the operating system." msgstr "" "常に :c:type:`PyMutex` を使うようになりました。\n" "以前のバージョンでは、オペレーティングシステムが提供するロックを使っていまし" "た。" msgid "" "Destroy *lock*. The lock should not be held by any thread when calling this." msgstr "" "*lock* を破棄します。\n" "呼び出す際に、どのスレッドもこのロックを保持していてはなりません。" msgid "Acquire *lock* with a timeout." msgstr "タイムアウト付きで *lock* を取得します。" msgid "" "This will wait for *microseconds* microseconds to acquire the lock. If the " "timeout expires, this function returns :c:enumerator:`PY_LOCK_FAILURE`. If " "*microseconds* is ``-1``, this will wait indefinitely until the lock has " "been released." msgstr "" "ロックを取得するまで *microseconds* マイクロ秒待ちます。\n" "タイムアウトすると :c:enumerator:`PY_LOCK_FAILURE` を返します。\n" "*microseconds* が ``-1`` の場合は、ロックが解放されるまで無期限に待ちます。" msgid "" "If *intr_flag* is ``1``, acquiring the lock may be interrupted by a signal, " "in which case this function returns :c:enumerator:`PY_LOCK_INTR`. Upon " "interruption, it's generally expected that the caller makes a call " "to :c:func:`Py_MakePendingCalls` to propagate an exception to Python code." msgstr "" "*intr_flag* が ``1`` の場合、ロックの取得がシグナルで中断されることがありま" "す。\n" "その場合は :c:enumerator:`PY_LOCK_INTR` を返します。\n" "中断されたときは、通常、呼び出し元が :c:func:`Py_MakePendingCalls` を呼んで " "Python コードに例外を伝えることが想定されています。" msgid "" "If the lock is successfully acquired, this function " "returns :c:enumerator:`PY_LOCK_ACQUIRED`." msgstr "ロックの取得に成功すると :c:enumerator:`PY_LOCK_ACQUIRED` を返します。" msgid "Acquire *lock*." msgstr "*lock* を取得します。" msgid "" "If *waitflag* is ``1`` and another thread currently holds the lock, this " "function will wait until the lock can be acquired and will always return " "``1``." msgstr "" "*waitflag* が ``1`` で、別のスレッドが現在ロックを保持している場合、ロックを" "取得できるまで待ち、常に ``1`` を返します。" msgid "" "If *waitflag* is ``0`` and another thread holds the lock, this function will " "not wait and instead return ``0``. If the lock is not held by any other " "thread, then this function will acquire it and return ``1``." msgstr "" "*waitflag* が ``0`` で、別のスレッドがロックを保持している場合は、待たずに " "``0`` を返します。\n" "他のスレッドがロックを保持していなければ、ロックを取得して ``1`` を返します。" msgid "" "Unlike :c:func:`PyThread_acquire_lock_timed`, acquiring the lock cannot be " "interrupted by a signal." msgstr "" ":c:func:`PyThread_acquire_lock_timed` と異なり、ロックの取得がシグナルで中断" "されることはありません。" msgid "" "Release *lock*. If *lock* is not held, then this function issues a fatal " "error." msgstr "" "*lock* を解放します。\n" "*lock* が保持されていない場合、この関数は致命的なエラーを発生させます。" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |