I am currently working with raspberry pi.
I wrote a simple library to control a 7-segment display, and it works great. I also made several programs that use the library.
I need to make sure that at any time only one program tries to control gpio . My first idea was to create a lock for a specific file.
How good is the practice and what is the best way to fully realize that ?
(To clear this up: I don't want all programs to be blocked from using gpio. That would be enough if only one program using my library could access gpio)
source
share