per page, with , order by , clip by
Results of 1 - 6 of about 6 for PyGILState (0.005 sec.)
スレッド状態とグローバルインタープリタロック 13179
スレッド状態とグローバルインタープリタロック CPython の フリースレッドビルド を除き、Python インタープリタは一般にスレッドセーフではありません。 マルチスレッドの Python プログラムをサポートするため、 グローバルインタープリタロック 、または ... hat you do need to create a thread state, call PyThreadState_New() followed by PyThreadState_Swap() , or use the dangerous PyGILState_Ensure() function. 拡張コードからのスレッド状態のデタッチ スレッド状態 を操作する拡張コードの多くは、次の単純な構造を取りま ... nterp will be a dangling pointer! Legacy API Another common pattern to call Python code from a non-Python thread is to use PyGILState_Ensure() followed by a call to PyGILState_Release() . These functions do not work well when multiple interpreters exist in ... s. If no Python interpreter has ever been used in the current thread (which is common for threads created outside Python), PyGILState_Ensure will create and attach a thread state for the "main" interpreter (the first interpreter in the Python process). Add ...
https://man.mtool.work/python/3.14/c-api/threads.html
C API Stability 8646
C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修 ... () PyFrame_GetLineNumber() PyFrozenSet_New() PyFrozenSet_Type PyGC_Collect() PyGC_Disable() PyGC_Enable() PyGC_IsEnabled() PyGILState_Ensure() PyGILState_GetThisThreadState() PyGILState_Release() PyGILState_STATE PyGetSetDef PyGetSetDescr_Type PyImport_Add ...
https://man.mtool.work/python/3.14/c-api/stable.html
C API 拡張のフリースレッド対応 8518
C API 拡張のフリースレッド対応 CPython 3.13 から、 global interpreter lock (GIL) を無効にして実行する free threading という構成がサポートされています。 このドキュメントでは、C API を使う拡張をフリースレッドに対応させる方法を説明します。 C か ... ださい。 スレッド状態と GIL の API Python は、スレッド状態と GIL を管理するために、次のような関数やマクロを提供しています。 PyGILState_Ensure() と PyGILState_Release() PyEval_SaveThread() と PyEval_RestoreThread() Py_BEGIN_ALLOW_THREADS と Py_END_ALLOW_THRE ... to manage thread state even when the GIL is disabled. For example, if you create a thread outside of Python, you must call PyGILState_Ensure() before calling into the Python API to ensure that the thread has a valid Python thread state. I/O やロック取得など ...
https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
Python プロセス内の複数のインタープリタ 8463
Python プロセス内の複数のインタープリタ ほとんどの場合は埋め込む Python インタプリタは1つだけですが、いくつかの場合に同一プロセス内、あるいは同一スレッド内で、複数の独立したインタプリタを作成する必要があります。 これを可能にするのがサブイン ... 能性があるためです。 これらのオブジェクトにたどり着けるオブジェクトの共有を避けることも、同様に重要です。 サブインタプリタを PyGILState_* API と組み合わせるのが難しいことにも注意してください。これらのAPIはPythonのスレッド状態とOSレベルスレッドが1対1で対応して ... いることを前提にしていて、サブインタプリタが存在するとその前提が崩れるからです。対応する PyGILState_Ensure() と PyGILState_Release() の呼び出しのペアの間では、サブインタプリタの切り替えを行わないことを強く推奨します。さらに ...
https://man.mtool.work/python/3.14/c-api/subinterpreters.html
What's New In Python 3.13 8024
What's New In Python 3.13 エディタ : Adam Turner と Thomas Wouters この記事では Python 3.12 と比較した Python 3.13 の新機能を解説します。Python 3.13 は2024年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 71 ... ます。 PyEval_SaveThread() と PyEval_RestoreThread() 。 low-level PyEval_AcquireThread() and PyEval_ReleaseThread() ; または PyGILState_Ensure() と PyGILState_Release() 。 (Victor Stinner による gh-105182 での貢献。) Python 3.9 で非推奨となった PyEval_Thread ...
https://man.mtool.work/python/3.14/whatsnew/3.13.html
What's New In Python 3.8 7969
What's New In Python 3.8 編集者 : Raymond Hettinger この記事では Python 3.7 と比較した Python 3.8 の新機能を解説します。 Python 3.8 は 2019 年 10 月 14 日にリリースされました。 詳しくは 変更履歴 を参照してください。 概要 -- リリースハイライ ... タープリタの終了処理中に呼ぶと現在のスレッドを終了するようになりました。 PyEval_RestoreThread() 、 Py_END_ALLOW_THREADS() 、 PyGILState_Ensure() と同じ動作になります。 これを望まない場合は、 _Py_IsFinalizing() または sys.is_finalizing() を確認して呼び出しを保 ...
https://man.mtool.work/python/3.14/whatsnew/3.8.html
PREV 1 NEXT