[Python-ideas] Extending language syntax
Charles-François Natali
cf.natali at gmail.com
Tue Nov 12 11:37:29 CET 2013
2013/11/12 Andrew Barnert <abarnert at yahoo.com>:
> Is there any implementation (like one of the PyPy sub projects) that uses refcounting, with interlocked increments if two interpreter threads are live but plain adds otherwise? In such an implementation, I think the cost of checking a second flag to avoid the interlocked increment would, at least on many platforms (including x86, x86_64, and arm9), be comparatively very cheap, and if used widely could provide big benefits.
How would you do this in a thread-safe way without atomic operations,
or at least memory barriers?
cf
More information about the Python-ideas
mailing list