I'm a beginner in Python. Now I read about Threading and I have some questions.
IMO Atomic Operations (AO) = the simplest operation. the simplest operation in dev is a = 1
. But I did read the article (http://preshing.com/20130618/atomic-vs-non-atomic-operations/) and I got the impression that it did not the simplest operation\AO. The author told us this operation divided into two operations and this operation wasn't AO. That this operation was AO it had to have another type. But I must say he told about C/C++ and bytecode, I think the same in Python. How I understood this depend on a type and maybe compiler. BUT Python is dynamic types of language. It has no types.
And I decided to ask the community these questions:
What are Atomic Operations in Python?
Which operations are AO in Python?
If the simple operation isn't simple then I do not understand what is Atomic Operations.
The Python documentation's FAQ seems to have a pretty good answer to this question under What kinds of global value mutation are thread-safe?
I hope you understand the difference between a local stack variable, or a variable otherwise private to a particular thread, that won't have issues with thread safety, and a global or shared variable that will.
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