ca.nengo.util.impl
Class NodeThreadPool
java.lang.Object
ca.nengo.util.impl.NodeThreadPool
- Direct Known Subclasses:
- GPUNodeThreadPool
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
myNodeThreads
protected NodeThread[] myNodeThreads
myLock
protected java.lang.Object myLock
myNodes
protected java.util.concurrent.LinkedBlockingQueue<Node> myNodes
myNodeArray
protected Node[] myNodeArray
myNumNodesRequired
protected int myNumNodesRequired
myNumNodesProcessed
protected int myNumNodesProcessed
myStartTime
protected volatile float myStartTime
myEndTime
protected volatile float myEndTime
isSleeping
protected volatile boolean isSleeping
myKill
protected volatile boolean myKill
NodeThreadPool
protected NodeThreadPool()
NodeThreadPool
public NodeThreadPool(Node[] nodes)
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()
finishedRun
public boolean finishedRun()
initialize
protected void initialize(Node[] nodes)
step
public void step(float startTime,
float endTime)
waitForThreads
protected void waitForThreads()
kill
public void kill()
getNextNode
public Node getNextNode()
finishedANode
public void finishedANode()