org.apache.qpid.junit.concurrency
Class ThreadTestExample
java.lang.Object
org.apache.qpid.junit.concurrency.ThreadTestExample
public class ThreadTestExample
- extends Object
An example to illustrate the use of the ThreadTestCoordinator
and TestRunnable
s.
CRC Card
Responsibilities | Collaborations
|
---|
Demo multi-threaded testing.
|
Method Summary |
void |
main(String[] args)
Executes the test threads with coordination. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
testThread1
TestRunnable testThread1
- Test thread 1.
sharedLock
final Object sharedLock
- A shared lock between the test threads.
testThread2
TestRunnable testThread2
- Test thread 2.
ThreadTestExample
public ThreadTestExample()
main
public void main(String[] args)
- Executes the test threads with coordination.
- Parameters:
args
- Ignored.
Licensed to the Apache Software Foundation