Package org.nfunk.jepexamples
Class ThreadTest
java.lang.Object
org.nfunk.jepexamples.ThreadTest
This class tests the thread safety of the JEP package with a brute force
approach. 1000 threads are started, and each one invokes the evaluate method.
The evaluate method creates 10 JEP instances. Note that running this class
successfully does not necessarily ensure that no errors will ever occur.
Thanks to Matthew Baird and Daniel Teng for this code.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ThreadTest
public ThreadTest()
-
-
Method Details
-
main
Main method. Launches many threads. -
evaluate
public void evaluate()Perform a simple evaluation using a new JEP instance. This method is called by all ThreadTestThreads at very much the same time.
-