Jython, GILs and object locking.
Carl Banks
imbosol at aerojockey.invalid
Wed Oct 15 18:18:44 EDT 2003
Andrew Dalke wrote:
> Carl Banks:
>> Of course, that would require a whole new garbage collection scheme.
>> But honestly, that's probably simple compared to getting rid of
>> reference counting and the GIL.
>
> But if you do that you should keep support for ref counting,
> because there are some C libraries which are very hard to
> deal with unless objects are deallocated in just the right order,
> and ref counting has the nice characteristic that you know when
> objects will be cleared (excepting the lack of defined order
> when objects go out of scope).
Well, like the guy said, that would mean you have to guard the
reference counter with locks. That seems far too expensive to me.
I would say the two things are practically irreconcilable. Either we
rewrite the C libraries not to depend on order of deallocation (I
don't think depending on it is the most robust thing to do anyways),
or keep things the way they are.
--
CARL BANKS http://www.aerojockey.com/software
As the newest Lady Turnpot descended into the kitchen wrapped only in
her celery-green dressing gown, her creamy bosom rising and falling
like a temperamental souffle, her tart mouth pursed in distaste, the
sous-chef whispered to the scullery boy, "I don't know what to make of
her."
--Laurel Fortuner, Montendre, France
1992 Bulwer-Lytton Fiction Contest Winner
More information about the Python-list
mailing list