A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-January/031937.html below:

[Python-Dev] Extension modules, Threading, and the GIL

[Python-Dev] Extension modules, Threading, and the GIL"Martin v. Löwis" martin@v.loewis.de
Wed, 08 Jan 2003 14:26:13 +0100
Mark Hammond wrote:
> 1) Allow "arbitrary" threads (that is, threads never before seen by Python)
> to acquire the resources necessary to call the Python C API.

This is possible today, all you need is a pointer to an interpreter 
state. If you have that, you can use PyThreadState_New, 
PyEval_AcquireThread, after which you have the resources necessary to 
call the Python API.

In many cases, extensions can safely assume that there is exactly one 
interpreter state all the time, so they can safe the interpreter pointer 
in their init function.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4