sk.baka.webvm.analyzer
Class Deadlock

java.lang.Object
  extended by sk.baka.webvm.analyzer.Deadlock

public final class Deadlock
extends Object

Simulates a deadlock.

Author:
Martin Vysny

Field Summary
 Throwable t
          If one of the threads fail then the cause is stored here.
 
Constructor Summary
Deadlock()
           
 
Method Summary
 void cancel()
          Cancels the deadlock, disposing of the threads.
 void checkThreads()
          Checks that the threads are running and no exception was thrown.
 void simulate()
          Simulates a deadlock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

t

public volatile Throwable t
If one of the threads fail then the cause is stored here.

Constructor Detail

Deadlock

public Deadlock()
Method Detail

simulate

public void simulate()
Simulates a deadlock. The deadlock should be already simulated when the method finishes.


cancel

public void cancel()
Cancels the deadlock, disposing of the threads.


checkThreads

public void checkThreads()
Checks that the threads are running and no exception was thrown.



Copyright © 2010 Baka. All Rights Reserved.