Lines Matching defs:WorkerThread

53  *     "new WorkerThread(workerNum, test)"
54 * to create WorkerThread-workerNum that executes the test code.
55 * The WorkerThread class can be extended to provide test thread
68 * "void executeRace(WorkerThread)"
93 * DriverThread WorkerThread-0 WorkerThread-N-1
110 * <join WorkerThreads> <WorkerThread ends> <WorkerThread ends>
142 * WorkerThreads are running in parallel as each WorkerThread ends.
204 // - standard WorkerThread
207 WorkerThread[] workers = new WorkerThread[2];
209 workers[i] = new WorkerThread(i, test);
216 // # of fails; AtomicInteger since any WorkerThread can increment
301 public void runTest(DriverThread driver, WorkerThread[] workers) {
347 * Initialize 1-time items for a WorkerThread. Called by a
348 * WorkerThread after oneTimeDriverInit() and before the
349 * WorkerThread checks in with startBarrier. May execute in
351 * WorkerThread's oneTimeWorkerInit() call or another
352 * WorkerThread's perRaceWorkerInit() call.
353 * @param wt the WorkerThread
355 public void oneTimeWorkerInit(WorkerThread wt) {
374 * Initialize per-race items for a WorkerThread. Called by each
375 * WorkerThread before it checks in with startBarrier. On the first
377 * WorkerThread's oneTimeWorkerInit() call. On any call, this method
379 * WorkerThread's perRaceWorkerInit() call. After any race except
381 * perRaceDriverEpilog() or another WorkerThread's
383 * @param wt the WorkerThread
385 public void perRaceWorkerInit(WorkerThread wt) {
391 * Execute the race in a WorkerThread. Called by each WorkerThread
393 * @param wt the WorkerThread
395 public void executeRace(WorkerThread wt) {
427 * Handle end-of-race items for a WorkerThread. Called by each
428 * WorkerThread after it has been released from resetBarrier and
429 * before the WorkerThread checks in again with startBarrier.
431 * WorkerThread's perRaceWorkerEpilog() call. If this is not the
433 * or another WorkerThread's perRaceWorkerInit() call. If this
435 * WorkerThread's oneTimeWorkerEpilog() call.
436 * @param wt the WorkerThread
438 public void perRaceWorkerEpilog(WorkerThread wt) {
444 * Handle end-of-test items for a WorkerThread. Called by each
445 * WorkerThread after it has detected that all races are done and
447 * with perRaceDriverEpilog(), with another WorkerThread's
448 * perRaceWorkerEpilog() call or with another WorkerThread's
450 * @param wt the WorkerThread
452 public void oneTimeWorkerEpilog(WorkerThread wt) {
487 private void run(WorkerThread[] workers) {
604 * WorkerThread for executing the race.
606 public static class WorkerThread extends Thread {
611 * Creates WorkerThread-N that executes the test code. The
612 * WorkerThread class can be extended to provide test thread
614 * @param workerNum the number for the new WorkerThread
617 WorkerThread(int workerNum, RacingThreadsTest test) {
618 super("WorkerThread-" + workerNum);
624 * get the WorkerThread's number
625 * @return the WorkerThread's number
632 * Run the race in a WorkerThread.
637 // initialize 1-time items for the WorkerThread
641 // initialize per-race items for the WorkerThread
654 // execute the race for the WorkerThread
677 // handle end-of-race items for the WorkerThread
681 // handle end-of-test items for the WorkerThread