Closed stevieb9 closed 5 years ago
Perhaps each Pi object should have a checksum created on initialization, stored both in the object as well as the shared memory, and each pin registered should be associated with that Pi checksum, so only that object's pins are cleaned up on failure or closure.
One way to generate a random identifier:
perl -wMstrict -MDigest::MD5 -E 'say Digest::MD5::md5_hex(rand)'
4f08e6d04f61b97ac8858ce11cf230d1
When an object fails to instantiate due to conflicting pins, don't delete the entire shared memory.
Currently, the entire shared memory is wiped, which will clearly break other separate objects in other processes.