Results of 1 - 10 of about 36 for locks (0.006 sec.)
- C API Extension Support for Free Threading — Python 3.14.8 ドキュメント 11934
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » C API Extension Support for Free Threading テーマ 自動 ライト ダーク | C API Extension Support for Free Threading ¶ Starting with the 3.13 release
...AL_SECTION ( obj ); obj -> count = new_count ; Py_END_CRITICAL_SECTION (); How Critical Sections Work ¶ Unlike traditional locks, critical sections do not guarantee exclusive access throughout their entire duration. If a thread would block while holdi...a critical section (e.g., by acquiring another lock or performing I/O), the critical section is temporarily suspended—all locks are released—and then resumed when the blocking operation completes. This behavior is similar to what happens with the GIL...os enforce this since they must be paired and within the same scope) Critical sections automatically release and reacquire locks around potential blocking operations Deadlock Avoidance ¶ Critical sections help avoid deadlocks in two ways: If a thread... - https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
- C API Extension Support for Free Threading — Python 3.14.8 ドキュメント 11934
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » C API Extension Support for Free Threading テーマ 自動 ライト ダーク | C API Extension Support for Free Threading ¶ Starting with the 3.13 release
...AL_SECTION ( obj ); obj -> count = new_count ; Py_END_CRITICAL_SECTION (); How Critical Sections Work ¶ Unlike traditional locks, critical sections do not guarantee exclusive access throughout their entire duration. If a thread would block while holdi...a critical section (e.g., by acquiring another lock or performing I/O), the critical section is temporarily suspended—all locks are released—and then resumed when the blocking operation completes. This behavior is similar to what happens with the GIL...os enforce this since they must be paired and within the same scope) Critical sections automatically release and reacquire locks around potential blocking operations Deadlock Avoidance ¶ Critical sections help avoid deadlocks in two ways: If a thread... - https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
- 同期プリミティブ — Python 3.14.8 ドキュメント 11157
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ The C-API provides a basic mutual exclusion lock. type PyMutex ¶
...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. Added in version 3.14. Python critical section API ¶ The critical section API...provides a deadlock avoidance layer on top of per-object locks for free-threaded CPython. They are intended to replace reliance on the global interpreter lock , and are no-ops in versio...otable exception of PyDict_Next() , which requires critical section to be acquired externally. Critical sections avoid deadlocks by implicitly suspending active critical sections, hence, they do not provide exclusive access such as provided by traditi... - https://man.mtool.work/python/3.14/c-api/synchronization.html
- 同期プリミティブ — Python 3.14.8 ドキュメント 10602
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ The C-API provides a basic mutual exclusion lock. type PyMutex ¶
...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. Added in version 3.14. Python critical section API ¶ The critical section API...provides a deadlock avoidance layer on top of per-object locks for free-threaded CPython. They are intended to replace reliance on the global interpreter lock , and are no-ops in versio...otable exception of PyDict_Next() , which requires critical section to be acquired externally. Critical sections avoid deadlocks by implicitly suspending active critical sections, hence, they do not provide exclusive access such as provided by traditi... - https://man.mtool.work/python/3.14/c-api/synchronization.html
- Thread Safety Guarantees — Python 3.14.8 ドキュメント 10270
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Thread Safety Guarantees テーマ 自動 ライト ダーク | Thread Safety Guarantees ¶ This page documents thread-safety guarantees for bui
...n that is safe for concurrent use on the same object. The implementation uses internal synchronization (such as per-object locks or critical sections ) to protect shared mutable state, so callers do not need to supply their own locking. Example: PyLis...odifications: item in lst lst . index ( item ) lst . count ( item ) All of the above operations avoid acquiring per-object locks . They do not block concurrent modifications. Other operations that hold a lock will not block these from observing interm...ions also compare values using __eq__() , so for non-built-in types the lock may be released during comparison. fromkeys() locks both the new dictionary and the iterable when the iterable is exactly a dict , set , or frozenset (not subclasses): dict .... - https://man.mtool.work/python/3.14/builtins/threadsafety.html
- Thread Safety Guarantees — Python 3.14.8 ドキュメント 10270
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Thread Safety Guarantees テーマ 自動 ライト ダーク | Thread Safety Guarantees ¶ This page documents thread-safety guarantees for bui
...n that is safe for concurrent use on the same object. The implementation uses internal synchronization (such as per-object locks or critical sections ) to protect shared mutable state, so callers do not need to supply their own locking. Example: PyLis...odifications: item in lst lst . index ( item ) lst . count ( item ) All of the above operations avoid acquiring per-object locks . They do not block concurrent modifications. Other operations that hold a lock will not block these from observing interm...ions also compare values using __eq__() , so for non-built-in types the lock may be released during comparison. fromkeys() locks both the new dictionary and the iterable when the iterable is exactly a dict , set , or frozenset (not subclasses): dict .... - https://man.mtool.work/python/3.14/builtins/threadsafety.html
- Thread states and the global interpreter lock — Python 3.14.8 ドキュメント 8938
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » Thread states and the global interpreter lock テーマ 自動 ライト ダーク | Thread states and the global interpreter lock ¶ Unless
...he interpreter regularly tries to switch threads between bytecode instructions (see sys.setswitchinterval() ). This is why locks are also necessary for thread-safety in pure-Python code. Additionally, the global interpreter lock is released around blo...hon ソース配布物内の使用例を見てください。 注釈 These macros are still necessary on the free-threaded build to prevent deadlocks. Py_BEGIN_ALLOW_THREADS ¶ 次に属します: Stable ABI . このマクロを展開すると { PyThreadState *_save; _save = PyEval_SaveThr...ith fork() , after a process forks only the thread that issued the fork will exist. This has a concrete impact both on how locks must be handled and on all stored state in CPython's runtime. The fact that only the "current" thread remains means any lo... - https://man.mtool.work/python/3.14/c-api/threads.html
- 用語集 — Python 3.14.8 ドキュメント 8938
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » 用語集 テーマ 自動 ライト ダーク | 用語集 ¶ >>> ¶ 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見ら
...zation to control their access. Data races lead to non-deterministic behavior and can cause data corruption. Proper use of locks and other synchronization primitives prevents data races. Note that data races can only happen in native code, but that na...olds lock 2 and waits for lock 1, both threads will wait indefinitely. In Python this often arises from acquiring multiple locks in conflicting orders or from circular join/await dependencies. Deadlocks can be avoided by always acquiring multiple lock...] can fail if another thread removes key from mapping after the test, but before the lookup. This issue can be solved with locks or by using the EAFP approach. See also thread-safe . lexical analyzer ¶ Formal name for the tokenizer ; see token . list... - https://man.mtool.work/python/3.14/glossary.html
- Thread states and the global interpreter lock — Python 3.14.8 ドキュメント 8938
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » Thread states and the global interpreter lock テーマ 自動 ライト ダーク | Thread states and the global interpreter lock ¶ Unless
...he interpreter regularly tries to switch threads between bytecode instructions (see sys.setswitchinterval() ). This is why locks are also necessary for thread-safety in pure-Python code. Additionally, the global interpreter lock is released around blo...hon ソース配布物内の使用例を見てください。 注釈 These macros are still necessary on the free-threaded build to prevent deadlocks. Py_BEGIN_ALLOW_THREADS ¶ 次に属します: Stable ABI . このマクロを展開すると { PyThreadState *_save; _save = PyEval_SaveThr...ith fork() , after a process forks only the thread that issued the fork will exist. This has a concrete impact both on how locks must be handled and on all stored state in CPython's runtime. The fact that only the "current" thread remains means any lo... - https://man.mtool.work/python/3.14/c-api/threads.html
- 用語集 — Python 3.14.8 ドキュメント 8938
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » 用語集 テーマ 自動 ライト ダーク | 用語集 ¶ >>> ¶ 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見ら
...zation to control their access. Data races lead to non-deterministic behavior and can cause data corruption. Proper use of locks and other synchronization primitives prevents data races. Note that data races can only happen in native code, but that na...olds lock 2 and waits for lock 1, both threads will wait indefinitely. In Python this often arises from acquiring multiple locks in conflicting orders or from circular join/await dependencies. Deadlocks can be avoided by always acquiring multiple lock...] can fail if another thread removes key from mapping after the test, but before the lookup. This issue can be solved with locks or by using the EAFP approach. See also thread-safe . lexical analyzer ¶ Formal name for the tokenizer ; see token . list... - https://man.mtool.work/python/3.14/glossary.html