Android Engineering Lead @ NowSoftware. Passionate about mobile development and learning.
But if we add @Singleton annotation to provideMultiThreadExecutor() method in AppModule, then the object will be cached for the entire dependency tree, and multiExecutor, multiExecutor2, multiExecutor3 will refer to the same object.
…So the library allows us to postpone the initialization of the object till the first call using the Provider<> and Lazy<> interfaces is made.
rovide either scoped or unscoped objects. B…e single purpose of these annotations is to point Dagger provide either scoped or unscoped objects. But again, it’s we who are in charge for “scoped” objects lifecycle.