live.threads
Class ParallelRunner
java.lang.Object
java.lang.Thread
live.threads.ThreadedUserAction
live.threads.Runner
live.threads.ParallelRunner
- All Implemented Interfaces:
- Runnable
- public class ParallelRunner
- extends Runner
This is an early version of the parallel runner. Currently it doesn't
support the parallelism parameter, but the constructor is there so that
client code needn't be changed later after support is added.
- Author:
- Evan Driscoll
Method Summary |
protected void |
runImpl()
Starts the threads, up to thisThreadsParallelism of them at a time |
Methods inherited from class live.threads.ThreadedUserAction |
getCache, getException, getID, getStatus, getTimeFinished, getTimeStarted, init, init, isFinished, result, run, setComplete, setError, setError, setIndeterminate, setIndeterminate, setInProgress, startJoinForever, startJoinTimeout, startNoJoin, toString |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
DEFAULT_PARALLELISM
private static final int DEFAULT_PARALLELISM
- See Also:
- Constant Field Values
THREAD_CHECK_WAIT_MS
private static final int THREAD_CHECK_WAIT_MS
- See Also:
- Constant Field Values
thisThreadsParallelism
private int thisThreadsParallelism
active
private final ActiveThreadsInfo active
info
private final ThreadInitInfo info
ParallelRunner
public ParallelRunner(ThreadInitInfo initInfo,
String description,
int parallelism)
- Constructs a parallelRunner with a specified parallelism (number of threads to run at once)
- Parameters:
initInfo
- Thread initialization informationdescription
- Description of the threadparallelism
- How many threads to run at once
ParallelRunner
public ParallelRunner(ThreadInitInfo initInfo,
String description)
- Constructs a parallel runner with the default parallelism
- Parameters:
initInfo
- Initialization information for the threaddescription
- Description of the thread
runImpl
protected void runImpl()
throws Exception
- Starts the threads, up to thisThreadsParallelism of them at a time
- Specified by:
runImpl
in class ThreadedUserAction
- Throws:
Exception
- See Also:
ThreadedUserAction.run()
Copyright © 2005