org.nfunk.jepexamples
Class ThreadTest

java.lang.Object
  extended by org.nfunk.jepexamples.ThreadTest

public class ThreadTest
extends Object

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
ThreadTest()
           
 
Method Summary
 void evaluate()
          Perform a simple evaluation using a new JEP instance.
static void main(String[] args)
          Main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadTest

public ThreadTest()
Method Detail

main

public static void main(String[] args)
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.



Copyright © 2014. All rights reserved.