suggestion: swap function in Python
Toby Dickenson
tdickenson at devmail.geminidataloggers.co.uk
Tue Jun 5 10:40:11 EDT 2001
Skip Montanaro <skip at pobox.com> wrote:
> If you need it to be atomic (the
>only possible reason I can see for implementing this idea), you'd have to
>define a new opcode for the Python VM.
I dont think it is possible to implement an atomic swap in Jython.
If you are happy with a CPython-only solution, use bytecodehacks.
Toby Dickenson
tdickenson at geminidataloggers.com
More information about the Python-list
mailing list