A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-August/112861.html below:

[Python-Dev] GIL removal question

[Python-Dev] GIL removal question [Python-Dev] GIL removal questionNick Coghlan ncoghlan at gmail.com
Sun Aug 14 03:37:18 CEST 2011
On Sun, Aug 14, 2011 at 9:26 AM, Guido van Rossum <guido at python.org> wrote:
>> These days we have PyGILState_Ensure():
>> http://docs.python.org/dev/c-api/init.html#PyGILState_Ensure
>>
>> and even dedicated documentation:
>> http://docs.python.org/dev/c-api/init.html#non-python-created-threads
>>
>> ;)
>
> That is awesome!

Although, if it's possible to arrange it, it's still better to do that
once and then use BEGIN/END_ALLOW_THREADS to avoid the overhead of
creating and destroying the temporary thread states:
http://blog.ccpgames.com/kristjan/2011/06/23/temporary-thread-state-overhead/

Still, it's far, far easier than it used to be to handle the GIL
correctly from non-Python created threads.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

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