Real case data corruption when using them from multiple threads?

Academic examples where I declare a global variable and then from different threads changing it it is clear. But who can give a real world case where this situation might arise?

And what is meant by potoko-safe data? An example can be?

Data also the idea of the isolated and global significance nobody in their right mind from multiple threads will not touch.
June 14th 19 at 18:11
3 answers
June 14th 19 at 18:13
Why just "global values", and those same attributes in classes or objects that write to the file. About real cases, I like to go to github, look for code with Lock/RLock, tinkered for what purpose he was there.
June 14th 19 at 18:15
I know that programmers often simply run Django in multi-threaded mode. They ponitiya not have about policosanol thread locals and all sorts of mutexes. This is a crazy example, but it from real life. And they do not even understand when they say you can't do that.
Also when writing to the database if you are using non-atomic operations upsert / update on confilct exists a simple select and insert statements, then errors occur. But this kind of mistake will not only with threads but also with processes.
June 14th 19 at 18:17
Here all the details and explained examples, with attainment in the source code to Python:
https://www.youtube.com/watch?v=7SSYhuk5hmc
Real case - any non-atomic operation.

Find more questions by tags Python