Robert Burrell Donkin ha scritto: > On 8/9/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: >> I don't get how it works. ConditionManager.resetInstance will set the >> static thread local fieldInstance to null: doesn't this invalidate also >> instances of every other thread using the ConditionManager ? > > good spot 8-) > > +1 > > probably better to use a stack and push the implementation into > ConditionManager
That's exactly what I was thinking right now. Other code simply call the getInstance. The reset and the set are only called there, so a stack seems much more appropriate. >> Shouldn't >> resetInstance simply remove the conditionManager from the fieldInstance >> ThreadLocal using a fieldInstance.set(null) ? > > i've been running with this change in for a couple of days and (as > yet) there haven't been any exceptions thrown > > - robert So, was this simply a test for us?? You already found that.. was it a secret?? :-P Next time just share also the solutions and not only the problem :-P Let's hope at least it really works properly :-) Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]