GitHub
2015-04-21 13:44:06 UTC
Branch: refs/heads/moe_writing_branch_from_156c8cc762fab971efb727c7ab107fa243be2fc9
Home: https://github.com/google/guice
Commit: 6c85843a85100c01992a1f3c6a16bb9270055d84
https://github.com/google/guice/commit/6c85843a85100c01992a1f3c6a16bb9270055d84
Author: sameb <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
M extensions/multibindings/src/com/google/inject/multibindings/MapKey.java
Log Message:
-----------
Add a default value and make it true for dagger & guice MapKey.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=89998087
Commit: 5e6c93348c4250012801b6e41753789d760f06e4
https://github.com/google/guice/commit/5e6c93348c4250012801b6e41753789d760f06e4
Author: timofeyb <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
M core/src/com/google/inject/internal/BindingProcessor.java
M core/src/com/google/inject/internal/BoundProviderFactory.java
M core/src/com/google/inject/internal/ConstructionContext.java
M core/src/com/google/inject/internal/ConstructorBindingImpl.java
M core/src/com/google/inject/internal/ConstructorInjector.java
A core/src/com/google/inject/internal/CycleDetectingLock.java
M core/src/com/google/inject/internal/DelegatingInvocationHandler.java
M core/src/com/google/inject/internal/Errors.java
M core/src/com/google/inject/internal/InheritingState.java
M core/src/com/google/inject/internal/InjectorImpl.java
M core/src/com/google/inject/internal/InternalContext.java
M core/src/com/google/inject/internal/InternalFactoryToInitializableAdapter.java
M core/src/com/google/inject/internal/ProvidedByInternalFactory.java
M core/src/com/google/inject/internal/ProviderInternalFactory.java
M core/src/com/google/inject/internal/Scoping.java
M core/src/com/google/inject/internal/SingletonScope.java
M core/src/com/google/inject/internal/State.java
M core/test/com/google/inject/ScopesTest.java
A core/test/com/google/inject/internal/CycleDetectingLockTest.java
Log Message:
-----------
Implement more granular locks for a Singleton scope in Guice.
Now when you can create two independent singletons using
the same injector in different threads.
This make it easy to create scopes creating singletons using
thread pools with all the concurrency being done by Guice.
As a nice side effect Singleton scope is no longer treated
specially in Guice codebase.
The obvious problem to solve is potential deadlocks:
A requires B, B requires C, C requires A where all are
singletons and all are created simultaneously.
It's impossible to detect this deadlock using information
within one thread, so we have to have a shared storage.
An idea is to have a map of creators' locks and a map
of which threads are waiting for other singletons to be created.
Using this information circular dependencies are trivially
discovered within O(N) where N is a number of concurrent threads.
Important to not that no other deadlock scenarios within
Guice code is introduced as Guice does not expose any
other scopes that can span several threads.
Now it would be possible for
client code to deadlock on itself with two lazy singletons
calling each other's providers during creation.
This is deemed as a non-issue as it is up to the client
to write a thread-safe code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=91610630
Commit: 3809a8196b693145828edd349952a9c4975ec249
https://github.com/google/guice/commit/3809a8196b693145828edd349952a9c4975ec249
Author: cgruber <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
R extensions/dagger-adapter/lib/dagger-2.0-20150205.014011-14.jar
A extensions/dagger-adapter/lib/dagger-2.0.jar
M extensions/dagger-adapter/pom.xml
Log Message:
-----------
Update dagger-adapter to depend on dagger-2.0 (and swap in the up-to-date api jar for the ant build)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=91679331
Compare: https://github.com/google/guice/compare/6986d188358d...3809a8196b69
Home: https://github.com/google/guice
Commit: 6c85843a85100c01992a1f3c6a16bb9270055d84
https://github.com/google/guice/commit/6c85843a85100c01992a1f3c6a16bb9270055d84
Author: sameb <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
M extensions/multibindings/src/com/google/inject/multibindings/MapKey.java
Log Message:
-----------
Add a default value and make it true for dagger & guice MapKey.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=89998087
Commit: 5e6c93348c4250012801b6e41753789d760f06e4
https://github.com/google/guice/commit/5e6c93348c4250012801b6e41753789d760f06e4
Author: timofeyb <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
M core/src/com/google/inject/internal/BindingProcessor.java
M core/src/com/google/inject/internal/BoundProviderFactory.java
M core/src/com/google/inject/internal/ConstructionContext.java
M core/src/com/google/inject/internal/ConstructorBindingImpl.java
M core/src/com/google/inject/internal/ConstructorInjector.java
A core/src/com/google/inject/internal/CycleDetectingLock.java
M core/src/com/google/inject/internal/DelegatingInvocationHandler.java
M core/src/com/google/inject/internal/Errors.java
M core/src/com/google/inject/internal/InheritingState.java
M core/src/com/google/inject/internal/InjectorImpl.java
M core/src/com/google/inject/internal/InternalContext.java
M core/src/com/google/inject/internal/InternalFactoryToInitializableAdapter.java
M core/src/com/google/inject/internal/ProvidedByInternalFactory.java
M core/src/com/google/inject/internal/ProviderInternalFactory.java
M core/src/com/google/inject/internal/Scoping.java
M core/src/com/google/inject/internal/SingletonScope.java
M core/src/com/google/inject/internal/State.java
M core/test/com/google/inject/ScopesTest.java
A core/test/com/google/inject/internal/CycleDetectingLockTest.java
Log Message:
-----------
Implement more granular locks for a Singleton scope in Guice.
Now when you can create two independent singletons using
the same injector in different threads.
This make it easy to create scopes creating singletons using
thread pools with all the concurrency being done by Guice.
As a nice side effect Singleton scope is no longer treated
specially in Guice codebase.
The obvious problem to solve is potential deadlocks:
A requires B, B requires C, C requires A where all are
singletons and all are created simultaneously.
It's impossible to detect this deadlock using information
within one thread, so we have to have a shared storage.
An idea is to have a map of creators' locks and a map
of which threads are waiting for other singletons to be created.
Using this information circular dependencies are trivially
discovered within O(N) where N is a number of concurrent threads.
Important to not that no other deadlock scenarios within
Guice code is introduced as Guice does not expose any
other scopes that can span several threads.
Now it would be possible for
client code to deadlock on itself with two lazy singletons
calling each other's providers during creation.
This is deemed as a non-issue as it is up to the client
to write a thread-safe code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=91610630
Commit: 3809a8196b693145828edd349952a9c4975ec249
https://github.com/google/guice/commit/3809a8196b693145828edd349952a9c4975ec249
Author: cgruber <***@google.com>
Date: 2015-04-21 (Tue, 21 Apr 2015)
Changed paths:
R extensions/dagger-adapter/lib/dagger-2.0-20150205.014011-14.jar
A extensions/dagger-adapter/lib/dagger-2.0.jar
M extensions/dagger-adapter/pom.xml
Log Message:
-----------
Update dagger-adapter to depend on dagger-2.0 (and swap in the up-to-date api jar for the ant build)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=91679331
Compare: https://github.com/google/guice/compare/6986d188358d...3809a8196b69
--
You received this message because you are subscribed to the Google Groups "google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice-dev+***@googlegroups.com.
To post to this group, send email to google-guice-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice-dev+***@googlegroups.com.
To post to this group, send email to google-guice-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/d/optout.