How can I share a lock between 2 processes that are runned from different scripts?
I have a program Server.py which has a shared memory space which will be accessed by many processes at a time, therefore I want to create a lock in the file Server.py. Some clients, spawned from a different file Client.py will access that shared memory section, and read and write from it. That is why I need a lock, created in the server, but known by the clients. The difficult part is that I want Server and client in different .py files to keep them as independant as possible, but do not know if there is a way, without creating an extra file above these two, of sharing a lock between them. Since obviously they need to have access to the SAME LOCK OBJECT, not a copy, in order to synchronize propperly.