I’m debugging a Java application that runs several threads. After a while of watching the log it seems that one of those threads is not running anymore. My guess is that the
You can't use timeouts with traditionally synchronized methods. However, using the "new" java.util.concurrent stuff, you can use programatic locks that have timeout support.
For example, look at java.util.concurrent.locks.ReentrantLock
A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.