Env: Python 3.9 on RasPi OS: I am looking for a easier alternative to queueing for a threaded app. The dictionary structure (including all keys) will be initialized by main. A MQTT thread, with the dictionary as a global, would be responsible for writing the values as they arrive. The main thread would only consume these values, never change them. Is this scenario thread-safe? With the GIL it would seem to be and this is a much simpler solution than queueing but I don’t want to have to use locks if I don’t have to.
Thanks.