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

Allow multiple USD in the same process on MacOS (#93) #2861

Conversation

dlarsson-adobe
Copy link

Description of Change(s)

This PR allows loading multiple usd libraries into the same process on macos (assuming they are uniquely namespaced and plugins are loaded from different locations etc).

It's implemented by driving the ArchConstructorEntry's version field through a preprocessor define so that the logic for calling them can distinguish entries from the two different builds and only call the appropriate ones.

This is arguably a hack abusing the field for something it should not be used for but if we change the layout of the struct it will break cases where we don't have control of the other usd instance than the one we are building ourselves since the struct is at play in both usd builds.

Note, I don't necessarily want this PR merged in this form, I just want to point out an issue through a workaround we had to apply to solve an issue.

Fixes Issue(s)

  • Adds the ability to load multiple usd libraries into the same process on macos.
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

…s#93)

This PR allows loading multiple usd libraries into the same process on macos (assuming they are uniquely namespaced and plugins are loaded from different locations etc).

It's implemented by driving the ArchConstructorEntry's version field through a preprocessor define so that the logic for calling them can distinguish entries from the two different builds and only call the appropriate ones.

This is arguably a hack abusing the field for something it should not be used for but if we change the layout of the struct it will
break cases where we don't have control of the other usd instance than the one we are building ourselves since the struct is
at play in both usd builds.

Adds the ability to load multiple usd libraries into the same process on macos.
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-9072

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