Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if one script fails (in multi), ensure that only that object's pins are reset #118

Closed
stevieb9 opened this issue Jul 4, 2019 · 3 comments

Comments

@stevieb9
Copy link
Owner

stevieb9 commented Jul 4, 2019

Currently, the entire shared memory is wiped, which will clearly break other separate objects in other processes.

@stevieb9
Copy link
Owner Author

stevieb9 commented Jul 4, 2019

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.

@stevieb9
Copy link
Owner Author

stevieb9 commented Jul 4, 2019

One way to generate a random identifier:

perl -wMstrict -MDigest::MD5 -E 'say Digest::MD5::md5_hex(rand)'

4f08e6d04f61b97ac8858ce11cf230d1

@stevieb9
Copy link
Owner Author

stevieb9 commented Jul 4, 2019

When an object fails to instantiate due to conflicting pins, don't delete the entire shared memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant