Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?
Daniel Dittmar
daniel.dittmar at sap.com
Fri Nov 3 12:34:57 EST 2006
robert wrote:
> (IPython is only a special "python network terminal" as already said.)
Sorry, I thought of IronPython, the .NET variant.
> Does Jython really eliminate the GIL? What happens when different
Yes.
> threads alter/read a dict concurrently - the basic operation in python,
> which is usually not protected by locks. Does Jython use a dict data
> type (and other collection types) which lock during _each_ access? in
> case - that may be very expensive.
True, though Java synchronization has gotten better and better. Still,
Sun introduced non locking hash tables, so it was a problem. It'd be
interesting to know which kind of dict is used in Jython for attribute
access.
>
> garbage is collected earliest, when the refcount went to 0. If it ever
> went to 0, no one will ever use such object again. Thus GC should not be
> different at all.
Since Python 2.?, there's a mark-and-sweep garbage collection in
addition to the reference counting scheme. This was put into Python to
be able to reclaim object cycles.
Daniel
More information about the Python-list
mailing list