after reading the tutorial about the data sharing between the callbacks, I would like to ask for the reason why global variables sharing is not safe in dash.
That’s basically my understanding after reading, the reason are
Because of the data are not shared between process in Dash (from author of Dash). But actually in my code I have used that a lot (even with very complex logic) and for single user in local mode, everything seems working properly.
Because of the non-atomic modify of global variables from different callback processes. That’s a basic issue in programing and can be well handled with mutex (or Lock from multiprocessing lib).
Because of multi-user case maybe in a deployment senario. But I don’t see the point, why the global variables will be corrupted in this case. From my understanding: As soon as a new users arrived, a new Dash instance will be created (new Process and new resources), if the code does a perfect job in synchronization, the global variable of user_1 should not be affected by another users.
I don’t know if I have understood correctly especially about point 3, it would be very nice if someone could solve my confusion. Thx in advance.