Antoine Pitrou <pit...@free.fr> added the comment: Le 01/10/2017 à 20:04, Daniel Colascione a écrit : > > It's not that specialized. You might want atomic updates for coordinating > with C APIs that expect callers to have this capability.
That does sound specialized to me :-) Can you give an example of such a C API? > You don't need to provide all of those builtins. Users can build them in > Python out of atomic-compare-and-exchange. Only compare and exchange needs > C support. It's not very much code. I'm assuming you're suggesting to write a loop with an atomic-compare-and-exchange. Bytecode execution in CPython being slow, it means you risk a lot more contention (and busy looping) than if the primitive was written in C. Perhaps even a semaphore would be faster :-) > I have little interest in a separate PyPI module. I don't want to have to > distribute custom-compiled extension modules. Understood, but that's not enough of an argument to put something in the standard library... You might want to float your idea on python-ideas to see if you get support from people who have a similar need: https://mail.python.org/mailman/listinfo/python-ideas ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31654> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com