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

Warm up methods in dependencies execute concurrently with root object when bound by interfaces #82

Closed
wfhartford opened this issue Sep 12, 2013 · 3 comments

Comments

@wfhartford
Copy link

The constraints around the concurrent execution of @WarmUp methods don't seem to apply when classes are bound by interface in a module, for example, in the following Module:

class MyModule extends AbstractModule {
  protected void configure() {
    bind(InterfaceOne.class).to(ImplementationOne.class);
    bind(InterfaceTwo.class).to(ImplementationTwo.class);
  }
}

If both implementations have @WarmUp methods, and ImplementationOne depends on ImplementationTwo, the two @WarmUp methods may be executed concurrently.

I've added a unit test which exposes this to my fork, would you like me to create a pull request?

@Randgalt
Copy link
Contributor

Yes, a PR would be awesome. Unfortunately, I haven't had a lot of time to spend on Governator so I don't know when I can get to it personally.

@Randgalt
Copy link
Contributor

#83

@Randgalt
Copy link
Contributor

This will be in the next release. Thank you for the submission.

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

No branches or pull requests

2 participants