awesome
On May 20, 2008, at 8:35 AM, Geert Bevin wrote: > Not yet, I'm still running my own test here to see if it really fixes > it. Seems good though since I normally almost get an instantly > deadlock and it has been running for a few minutes now. Also still > need to run the existing tests from the code base to make sure I > didn't break anything else ;-) > > After that I'll go through some other issues to see if they're > related. I found several occurrences of what I described below > throughout the java.util.concurrent locks code, so it it will be worth > checking what else it fixes :-) > > On 20 May 2008, at 17:28, Steven Harris wrote: > >> Cool, nice one, do we have bug numbers on the things this >> fixes? >> >> Cheers, >> Steve >> >> On May 20, 2008, at 8:25 AM, Geert Bevin wrote: >> >>> Hi all, >>> >>> I just spent quite a while tracking down a bug with >>> java.util.concurrent locks that for me caused a deadlock in my test >>> application, but that might also be the cause of many other locking >>> related problems we've seen. It all boiled down to an assumption >>> that >>> checked for Thread.interrupted() to check for the interruption of a >>> blocking action (like lockInterruptibly()). However, throwing >>> InterruptedException doesn't mean that the current thread is >>> interrupted, it means that a blocking action was interrupted. Using >>> Thread.interrupted() to check if a blocking action was interrupted >>> is >>> thus wrong and will not give the correct results. >>> Thread.interrupted() >>> checks for the interruption flag which is basically set by using the >>> interrupt() method on a thread. >>> >>> Just thought I'd point this out since I never really reflected on >>> this >>> difference before either. >>> >>> Take care, >>> >>> Geert >>> >>> -- >>> Geert Bevin >>> Terracotta - http://www.terracotta.org >>> Uwyn "Use what you need" - http://uwyn.com >>> RIFE Java application framework - http://rifers.org >>> Music and words - http://gbevin.com >>> >>> _______________________________________________ >>> tc-dev mailing list >>> [email protected] >>> http://lists.terracotta.org/mailman/listinfo/tc-dev >> >> _______________________________________________ >> tc-dev mailing list >> [email protected] >> http://lists.terracotta.org/mailman/listinfo/tc-dev > > -- > Geert Bevin > Terracotta - http://www.terracotta.org > Uwyn "Use what you need" - http://uwyn.com > RIFE Java application framework - http://rifers.org > Music and words - http://gbevin.com > > _______________________________________________ > tc-dev mailing list > [email protected] > http://lists.terracotta.org/mailman/listinfo/tc-dev _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
