-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Reference counting of InitAPI
#2411
Comments
Just to clearify this for me: Calling InitAPI multiple times on a machine is okay as long as you don't do it inside the same application? Or has such a reference count to be system wide? |
Yes, that should be fine as long as the programs aren't sharing memory |
You can also handle the error result when it is already initialized, and ignore it. |
Does anyone know why #2699 triggers only on MacOS? We see this only on MacOS, not Linux, and I'd like to understand what's Mac-specific here ... |
Describe the feature
Provide a mechanism to prevent the sdk from breaking when
InitAPI
gets called when it has already been initialized.Related issues/discussions:
Use Case
If code is being used in a library then there is currently no way for the library to know if
InitAPI
has already been called.Proposed Solution
This will not/should not be RAII.
Using locks and reference counting this would allow multiple calls of
InitAPI
. Changes need to be make on this sdk and with the CRTOther Information
Community Note
Acknowledgements
The text was updated successfully, but these errors were encountered: