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/2006-March/062359.html below:

[Python-Dev] Threading idea -- exposing a global thread lock

[Python-Dev] Threading idea -- exposing a global thread lock [Python-Dev] Threading idea -- exposing a global thread lockSamuele Pedroni pedronis at strakt.com
Tue Mar 14 08:34:59 CET 2006
Raymond Hettinger wrote:
>>it doesn't translate reasonably to Jython or IronPython, it's really tricky to 
>>implement,
> 
> 
> FWIW, someone on the newsgroup suggested implementing this via a slight 
> modification to sys.checkinterval().  The idea was that a None argument would 
> translate to "stop-checking" and the active thread would do a few steps 
> atomically and then restore the original value.  The new with-statement makes 
> that a piece of cake.
> 
>

there's no sys.checkinterval in Jython. Implementing this would need the
introduction of some kind of GIL implementation in Jython, the JVM has 
no primitive for global critical sections. A GIL is something users of 
Jython don't want. Even with that is way too easy to have non-Jython 
threads around that could manipulates Java objects you are seamlessy 
dealing with. That is of course true for CPython and C extension 
initiated threads too, but is probably harder to be oblivious
of such things in CPython context.
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