per page, with , order by , clip by
Results of 1 - 10 of about 21 for mutex (0.034 sec.)
同期プリミティブ — Python 3.14.8 ドキュメント 13091
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ The C-API provides a basic mutual exclusion lock. type PyMutex... A mutual exclusion lock. The PyMutex should be initialized to zero to represent the unlocked state. For example: PyMutex mutex = { 0 }; Instances of PyMutex sh ... ould not be copied or moved. Both the contents and address of a PyMutex are meaningful, and it must remain at a fixed, writable location in memory. 注釈 A PyMutex currently occupies one byte, bu ... idered unstable. The size may change in future Python releases without a deprecation period. Added in version 3.13. void PyMutex_Lock ( PyMutex * m ) ¶ Thread safety: Atomic . Lock mutex m . If another thread has already locked it, the calling thread ...
https://man.mtool.work/python/3.14/c-api/synchronization.html
同期プリミティブ — Python 3.14.8 ドキュメント 13091
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 同期プリミティブ テーマ 自動 ライト ダーク | 同期プリミティブ ¶ The C-API provides a basic mutual exclusion lock. type PyMutex... A mutual exclusion lock. The PyMutex should be initialized to zero to represent the unlocked state. For example: PyMutex mutex = { 0 }; Instances of PyMutex sh ... ould not be copied or moved. Both the contents and address of a PyMutex are meaningful, and it must remain at a fixed, writable location in memory. 注釈 A PyMutex currently occupies one byte, bu ... idered unstable. The size may change in future Python releases without a deprecation period. Added in version 3.13. void PyMutex_Lock ( PyMutex * m ) ¶ Thread safety: Atomic . Lock mutex m . If another thread has already locked it, the calling thread ...
https://man.mtool.work/python/3.14/c-api/synchronization.html
オブジェクトプロトコル (object protocol) — Python 3.14.8 ドキュメント 9725
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 抽象オブジェクトレイヤ (Abstract Objects Layer) » オブジェクトプロトコル (object protocol) テーマ 自動 ライト ダーク | オブジェク ... he following sketch could be adapted to implement a "weakmap" that works like a WeakValueDictionary for a specific type: PyMutex mutex ; PyObject * add_entry ( weakmap_key_type * key , PyObject * value ) { PyUnstable_EnableTryIncRef ( value ); weakmap ... _type weakmap = ...; PyMutex_Lock ( & mutex ); weakmap_add_entry ( weakmap , key , value ); PyMutex_Unlock ( & mutex ); Py_RETURN_NONE ; } PyObject * g ... et_value ( weakmap_key_type * key ) { weakmap_type weakmap = ...; PyMutex_Lock ( & mutex ); PyObject * result = weakmap_find ( weakmap , key ); if ( PyUnstable_TryIncRef ( result )) { // `result` ...
https://man.mtool.work/python/3.14/c-api/object.html
オブジェクトプロトコル (object protocol) — Python 3.14.8 ドキュメント 9725
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 抽象オブジェクトレイヤ (Abstract Objects Layer) » オブジェクトプロトコル (object protocol) テーマ 自動 ライト ダーク | オブジェク ... he following sketch could be adapted to implement a "weakmap" that works like a WeakValueDictionary for a specific type: PyMutex mutex ; PyObject * add_entry ( weakmap_key_type * key , PyObject * value ) { PyUnstable_EnableTryIncRef ( value ); weakmap ... _type weakmap = ...; PyMutex_Lock ( & mutex ); weakmap_add_entry ( weakmap , key , value ); PyMutex_Unlock ( & mutex ); Py_RETURN_NONE ; } PyObject * g ... et_value ( weakmap_key_type * key ) { weakmap_type weakmap = ...; PyMutex_Lock ( & mutex ); PyObject * result = weakmap_find ( weakmap , key ); if ( PyUnstable_TryIncRef ( result )) { // `result` ...
https://man.mtool.work/python/3.14/c-api/object.html
拡張モジュールを分離する — Python 3.14.8 ドキュメント 9285
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 拡張モジュールを分離する テーマ 自動 ライト ダーク | 拡張モジュールを分離する ¶ 概要 Traditionally, state belonging to Python extension modules wa ... explicitly make your module loadable only once per process. For example: // A process-wide flag static int loaded = 0 ; // Mutex to provide thread safety (only needed for free-threaded Python) static PyMutex modinit_mutex = { 0 }; static int exec_modu ... le ( PyObject * module ) { PyMutex_Lock ( & modinit_mutex ); if ( loaded ) { PyMutex_Unlock ( & modinit_mutex ); PyErr_SetString ( PyExc_ImportError , "canno ... t load module more than once per process" ); return -1 ; } loaded = 1 ; PyMutex_Unlock ( & modinit_mutex ); // ... rest of initialization } If your module's PyModuleDef.m_clear function is able to prepa ...
https://man.mtool.work/python/3.14/howto/isolating-extensions.html
拡張モジュールを分離する — Python 3.14.8 ドキュメント 9285
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 拡張モジュールを分離する テーマ 自動 ライト ダーク | 拡張モジュールを分離する ¶ 概要 Traditionally, state belonging to Python extension modules wa ... explicitly make your module loadable only once per process. For example: // A process-wide flag static int loaded = 0 ; // Mutex to provide thread safety (only needed for free-threaded Python) static PyMutex modinit_mutex = { 0 }; static int exec_modu ... le ( PyObject * module ) { PyMutex_Lock ( & modinit_mutex ); if ( loaded ) { PyMutex_Unlock ( & modinit_mutex ); PyErr_SetString ( PyExc_ImportError , "canno ... t load module more than once per process" ); return -1 ; } loaded = 1 ; PyMutex_Unlock ( & modinit_mutex ); // ... rest of initialization } If your module's PyModuleDef.m_clear function is able to prepa ...
https://man.mtool.work/python/3.14/howto/isolating-extensions.html
Thread Safety Guarantees — Python 3.14.8 ドキュメント 7712
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Thread Safety Guarantees テーマ 自動 ライト ダーク | Thread Safety Guarantees ¶ This page documents thread-safety guarantees for bui ... it executes instantaneously from the perspective of other threads. This is the strongest form of thread safety. Example: PyMutex_IsLocked() performs an atomic read of the mutex state and can be called from any thread at any time. Thread safety for lis ...
https://man.mtool.work/python/3.14/builtins/threadsafety.html
C API Extension Support for Free Threading — Python 3.14.8 ドキュメント 7712
ナビゲーション 索引 モジュール | 次へ | 前へ | 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 ... ld. What Are Critical Sections? ¶ Conceptually, critical sections act as a deadlock avoidance layer built on top of simple mutexes. Each thread maintains a stack of active critical sections. When a thread needs to acquire a lock associated with a crit ... ng a thread-safe C API function like PyDict_SetItem() , or explicitly using macros), it attempts to acquire the underlying mutex. Using Critical Sections ¶ The primary APIs for using critical sections are: Py_BEGIN_CRITICAL_SECTION and Py_END_CRITICAL ... Instead, use Py_BEGIN_CRITICAL_SECTION2 to lock two objects simultaneously. Note that the locks described above are only PyMutex based locks. The critical section implementation does not know about or affect other locking mechanisms that might be in u ...
https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
変更履歴 — Python 3.14.8 ドキュメント 7712
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac ... s module. Now it raises proper MemoryError errors. gh-150902 : Apply an existing optimization of PyCriticalSection (single mutex) to PyCriticalSection2: avoid acquiring the same locks that the current CS has already acquired. gh-151065 : Fix memory le ... ned by the current thread is used instead when it is not safe to immortalize the original. gh-148820 : Fix a race in _PyRawMutex on the free-threaded build where a Py_PARK_INTR return from _PySemaphore_Wait could let the waiter destroy its semaphore b ... properly support the perf_jit backend. Patch by Pablo Galindo. gh-114203 : Skip locking if object is already locked by two-mutex critical section. gh-141528 : Suggest using concurrent.interpreters.Interpreter.close() instead of the private _interprete ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
Thread Safety Guarantees — Python 3.14.8 ドキュメント 7712
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Thread Safety Guarantees テーマ 自動 ライト ダーク | Thread Safety Guarantees ¶ This page documents thread-safety guarantees for bui ... it executes instantaneously from the perspective of other threads. This is the strongest form of thread safety. Example: PyMutex_IsLocked() performs an atomic read of the mutex state and can be called from any thread at any time. Thread safety for lis ...
https://man.mtool.work/python/3.14/builtins/threadsafety.html
PREV 1 2 3 NEXT