[Python-ideas] [Python-Dev] [ANN]: "newthreading" - an approach to simplified thread usage, and a path to getting rid of the GIL

Michael Foord fuzzyman at gmail.com
Tue Jun 29 14:55:40 CEST 2010


On 29 June 2010 13:05, Nick Coghlan <ncoghlan at gmail.com> wrote:

> On Tue, Jun 29, 2010 at 9:54 AM, Michael Foord <fuzzyman at gmail.com> wrote:
> > Full agreement. Ironclad, a project to enable the use of Python C
> extensions with IronPython - which has a generational moving GC, uses a
> hybrid approach. It allows C extensions to use reference counting but
> manipulates the reference count so that it can only drop to zero once there
> are no references left on the IronPython side. There are complications with
> this approach, which Ironclad handles, but that would be much easier when we
> have control over the implementation (Ironclad doesn't change the IronPython
> implementation).
> >
> > No link I'm afraid, sending from a mobile device.
> >
> > Incidentally, Ironclad also 'fakes' the GIL as IronPython has no GIL. In
> theory this could cause problems for C extensions that aren't thread safe
> but that hasn't yet been a problem in production (Ironclad is mainly used
> with numpy).
>
> How much do you know about Resolver's licensing setup for Ironclad?
>


http://www.resolversystems.com/products/ironclad/

Ironclad is MIT licensed, but it is *very* tightly coupled to IronPython and
.NET (it works primarily through the .NET FFI and uses a fair bit of C#). It
may well be useful for inspiration, but I don't know how re-usable it is
likely to be.



> Combining Ironclad with a Boehm GC enabled PyMalloc mechanism might be
>


Boehm is a conservative collector, so whilst it may well be a "good first
step" it can leak memory like a sieve... Mono has always had this problem
and is finally getting rid of its conservative collector. The PyPy guys have
experience in this area.


> a fruitful avenue of research on the way to a free-threading CPython
> implementation. Losing deterministic refcounting for pure Python code
> is no longer as big an issue as it once was, as many of the tricks it
> used to enable are now better covered by context managers.
>
>
Right, and *most* of the alternative implementations are not reference
counted - so relying on reference counting semantics has been discouraged by
users of these platforms for a while now.

All the best,

Michael



> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>



-- 
http://www.voidspace.org.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100629/4cb04e1c/attachment.html>


More information about the Python-ideas mailing list