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

Improve generation of stubs to allow to generate them in parallel #1275

Open
activeeon-bot opened this issue Aug 18, 2014 · 0 comments
Open

Comments

@activeeon-bot
Copy link

Original issue created by Bastien Sauvan on 18, Aug 2014 at 15:11 PM - PALIGHT-66


Currently, stubs cannot be generated in parallel in the same JVM because the class JavassistByteCodeStubBuilder is not thread safe. If several stubs are generated in parallel the static fields proxyGetter and proxySetter can be modified concurrently and thus makes the generation fails.
To solve this issue, there is at least 2 solutions:

  • make the method createStubObjectMethods synchronized.
  • the fileds proxyGetter and proxySetter are static fields only to be used in the method checkMethod where their signatures are used to ensure that there is no conflict with the methods to be reified. Thus, instead of storing the CtMethods proxyGetter and proxySetter, only their signature could be stored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants