470e98f9d4054649ef83abff15ae569c549356dc
1 package org
.lttng
.ust
.tests
;
3 import java
.io
.IOException
;
4 import java
.util
.LinkedList
;
6 import java
.util
.logging
.Logger
;
8 public class Runner
implements Runnable
{
10 private final List
<Worker
> workers
;
11 private final List
<Thread
> workerThreads
;
13 public Runner(int nbThreads
, int nbIter
, Logger log
)
14 throws SecurityException
, IOException
{
17 this.workers
= new LinkedList
<>();
18 this.workerThreads
= new LinkedList
<>();
20 for (int id
= 0; id
< nbThreads
; id
++) {
21 curWorker
= new Worker(id
, nbIter
, log
);
22 workers
.add(curWorker
);
23 workerThreads
.add(new Thread(curWorker
, "worker " + id
));
29 // System.out.println("Starting");
30 for (Thread curThread
: workerThreads
) {
34 for (Thread curThread
: workerThreads
) {
37 } catch (InterruptedException e
) {
41 // System.out.println("Finished");
This page took 0.031097 seconds and 4 git commands to generate.