We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Circular Dependency check is unable to detect circular dependencies in singletons, as the Singleton will deadlock before the detection happens.
Testcase:
type circSingletonA struct { B *circSingletonB `inject:""` } type circSingletonB struct { A *circSingletonA `inject:""` } func TestCircularSingletonBinding(t *testing.T) { EnableCircularTracing() defer func() { traceCircular = nil }() injector := NewInjector() injector.Bind(new(circSingletonA)).In(Singleton) injector.GetInstance(new(circSingletonA)) }
The text was updated successfully, but these errors were encountered:
timeout on singleton deadlock, closes #10
7f340be
544a0a0
03f6ec1
No branches or pull requests
The Circular Dependency check is unable to detect circular dependencies in singletons, as the Singleton will deadlock before the detection happens.
Testcase:
The text was updated successfully, but these errors were encountered: