Issue 183: Scopes.SINGLETON does not cope with nested injectors http://code.google.com/p/google-guice/issues/detail?id=183
Comment #3 by zorzella: Even if I buy that, and at the risk of being pedantic, Foo's constructor needs not to start any thread -- but simply to communicate (directly or indirectly) with one. Say (for simplicity) that there's a static boolean "go" that blocks Baz's "run" method from progressing, and that Foo's constructor has access to an already started Thread(Baz) (and still "join"s it, of course). Same dead lock. As a conceptual mark, it seems very clear (to me) that Guice's SINGLETON implementation *conceptually* makes the (often correct, and even more often harmless, though naive) assumption that there's a single Injector created per ClassLoader. Still conceptually, it is more correct that one would be forced to create an instance of a "SingletonScope class" to be the Singleton scope for *their* Injector, so that the injector could lock on "this"... That at the cost of some verboseness. Even though this (as a mandatory change) is not possible at this point (I don't think), it would behoove us to have a way for people to instantiate their own "Singleton"s, if they so choose to... -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice-dev?hl=en -~----------~----~----~----~------~----~------~--~---
