Re: Eager initialization of singleton in a separate thread

2011-10-16 Thread Tim Peierls
On Sun, Oct 16, 2011 at 5:08 PM, Noel Yap wrote: > This looks really good! Can it work with Providers? I don't know what you mean. It works just like any other scope annotation. > And what about diamond dependencies (ie what happens if both A and B depend > upon C)? As long as the dependen

Re: Eager initialization of singleton in a separate thread

2011-10-16 Thread Noel Yap
This looks really good! Can it work with Providers? And what about diamond dependencies (ie what happens if both A and B depend upon C)? Also, in the example given, if B and C aren't annotated, will Guice know enough to have the annotation passed down (assuming A is being eagerly initialized)?

Re: Eager initialization of singleton in a separate thread

2011-10-16 Thread Tim Peierls
http://tembrel.blogspot.com/2009/11/concurrently-initialized-singletons-in.html On Sun, Oct 16, 2011 at 10:04 AM, Noel wrote: > I would like to do eager initialization of multiple singletons but the > initialization can take on the order of minutes so I would like the > initialization to happen

Eager initialization of singleton in a separate thread

2011-10-16 Thread Noel
I would like to do eager initialization of multiple singletons but the initialization can take on the order of minutes so I would like the initialization to happen on a separate thread. Is there a way to do this? Thanks, Noel -- You received this message because you are subscribed to the Google