The Source for Java Technology Collaboration
User: Password:



David Herron

David Herron's Blog

A useful testing technique to find deadlocks related to invokeAndWait

Posted by robogeek on January 19, 2006 at 08:51 PM | Comments (1)

Tom Hawtin writes about a deadlock he found in jedit 4.2. As he says: There was, however, a use of invokeAndWait. Sure enough the EDT was waiting on monitor locked by the thread calling invokeAndWait.

What's most interesting is a class he provides to help one automatically find those situations. It relies on a Mustang ability provided through the JMX support to query all held locks. The code looks to see if the Event Dispatch Thread is called with a parent stack frame in invokeAndWait, and then checks the locks. Really cool.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • See also "Automatically detecting AWT event dispatch thread hangs"

    Posted by: coxcu on January 30, 2006 at 03:30 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds