On Dec 26, 9:34 am, "Bob Lee" <[email protected]> wrote: > I'm wary of introducing unnecessary synchronization into critical code > paths. My patch introduces synchronization only in the two places where we're using ReferenceCache with non-String references: - LineNumbers - BytecodeGen
Both of these only happen at Injector-creation time. We've already set a precedent that we permit global (ie. static) synchronization at Injector-creation time in the implementation of Scopes.SINGLETON. So this code doesn't introduce any real performance degradation. > I'm pretty sure I can make ReferenceMap not start the thread unless you try > to use a weak or soft reference. If you do, we'll still need to avoid ReferenceCache in LineNumbers and BytecodeGen. So this synchronization doesn't really go away. I still think this fix is a net-win for our users... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
