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

Proposal to support reference counted sessions #1059

Conversation

paulolamas18
Copy link
Contributor

What does this Pull Request accomplish?

Add the ability for users to add a reference count to named sessions

Why should this Pull Request be merged?

The name sessions feature of grpc-device is amazing but has one major inconvenience: Close() will close the sessions for everyone holding a reference to the named session

What testing has been done?

Added unit tests so far. Will add more tests if this draft looks reasonable

@@ -11,6 +11,7 @@ enum SessionInitializationBehavior {
SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED = 0;
SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW = 1;
SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING = 2;
SESSION_INITIALIZATION_BEHAVIOR_REFERENCE_COUNTED = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

This conflicts with NI-VISA's extensions to this enum.

https://github.com/ni/grpc-device/wiki/Sharing-Driver-Sessions-Between-Clients

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.

2 participants