Skip to content

feat: impl ConnectionManager as thread safe singleton #122

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Maddin-619
Copy link

@Maddin-619 Maddin-619 commented Apr 30, 2025

There was a lot of confusion about connecting multiple devices: #66
@Spritaro you were right. The library is already capable of handling multiple implicit connections simultaneously. We just used the library the wrong way by using multiple ConnectionManager instances.

This PR should prevent this missuse by converting the ConnectionManager into a singleton.
Because we use the singleton from within multiple threads I included some mutex to sync the member vars. I think of adding some compile options to disable the mutex for high performance single thread use cases.
What do you think @chruetli and @sriharshav?

@chruetli
Copy link

chruetli commented May 1, 2025

@Maddin-619 Sorry Martin, I have to disappoint you. I moved to a commercial solution of an E/IP stack and do not use this solution anymore.

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