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

76 prevent user from instanciating two reachySDK #98

Conversation

glannuzel
Copy link
Member

I suggest to use a singleton decorator to check only one instance of ReachySDK is created.

I suggest to use a singleton decorator to check only one instance of ReachySDK is created.
@glannuzel glannuzel requested a review from simheo November 2, 2023 15:05
@glannuzel glannuzel self-assigned this Nov 2, 2023
@glannuzel glannuzel changed the title Add singleton decorator. 76 prevent user from instanciating two reahcysdk Nov 2, 2023
@glannuzel glannuzel changed the title 76 prevent user from instanciating two reahcysdk 76 prevent user from instanciating two reachySDK Nov 2, 2023
@glannuzel
Copy link
Member Author

glannuzel commented Nov 2, 2023

Note that this suggestion will close #77 as it prevents user from creating several instances of ReachySDK with no consideration of the IP address

Copy link
Member

@simheo simheo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great 👌

@glannuzel glannuzel merged commit cc58e7c into develop Nov 2, 2023
3 checks passed
@glannuzel glannuzel deleted the 76-prevent-user-from-instanciating-two-reachysdk-objects-in-the-same-python-kernel branch November 2, 2023 15:36
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

Successfully merging this pull request may close these issues.

Prevent user from instanciating two ReachySDK objects in the same Python kernel.
2 participants