ca.nengo.util.impl
Class NodeThreadPool
java.lang.Object
ca.nengo.util.impl.NodeThreadPool
public class NodeThreadPool
- extends java.lang.Object
A pool of threads for running nodes in. All interaction with the threads
is done through this class
- Author:
- Eric Crawford
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultNumThreads
protected static final int defaultNumThreads
- See Also:
- Constant Field Values
myNumThreads
protected static int myNumThreads
myThreads
protected NodeThread[] myThreads
myLock
protected java.lang.Object myLock
myNodes
protected Node[] myNodes
myProjections
protected Projection[] myProjections
numThreadsComplete
protected volatile int numThreadsComplete
threadsRunning
protected volatile boolean threadsRunning
runFinished
protected volatile boolean runFinished
myStartTime
protected float myStartTime
myEndTime
protected float myEndTime
NodeThreadPool
protected NodeThreadPool()
NodeThreadPool
public NodeThreadPool(Node[] nodes,
Projection[] projections)
getNumThreads
public static int getNumThreads()
setNumThreads
public static void setNumThreads(int value)
isMultithreading
public static boolean isMultithreading()
turnOffMultithreading
public static void turnOffMultithreading()
getStartTime
public float getStartTime()
getEndTime
public float getEndTime()
getRunFinished
public boolean getRunFinished()
initialize
protected void initialize(Node[] nodes,
Projection[] projections)
step
public void step(float startTime,
float endTime)
threadWait
public void threadWait()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
threadFinished
public void threadFinished()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
kill
public void kill()