Jon> To put it another way, would it actually matter if the reference
    Jon> counts for such objects became hopelessly wrong due to non-atomic
    Jon> adjustments?

I believe this was suggested and tried by someone (within the last few
years).  It wasn't any benefit.  The costs of special-casing outweighed the
costs of uniform reference counting, not to mention the code got more
complex.  Or something like that.  Anyway, it didn't work.

Just thinking out loud here, what if ... we use atomic test-and-set to
handle reference counting (with a lock for those CPU architectures where we
haven't written the necessary assembler fragment), then implement a lock for
each mutable type and another for global state (thread state, interpreter
state, etc)?  Might that be close enough to free threading to provide some
benefits, but not so fine-grained that lock contention becomes a bottleneck?

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to