Is it possible to have a CAS instruction in python? CAS = compare and swap.
I'm looking for something equivalent for expression in C++:
std::atomic<T> a;
a.compare_exchange_strong(x, y);
Python doesn't have CAS operation. As you know CAS is an atomic instruction used in multithreading to achieve synchronization. C++ has a much more sophisticated multithreading and synchronization than Python.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With