47 try {
48 if (gate != null) {
49 gate.await();
50 }
51 } catch (InterruptedException | BrokenBarrierException e) {
52 // At this point, interrupt would be an error.
53 e.printStackTrace();
54 throw new RuntimeException(e);
55 }
56
57 while (!Thread.interrupted()) {
58 for (int i = 0; i < 1000; i++) {
59 allocator.tick();
60 }
61 }
62
63 // System.out.println("+ [" + id + "] " + allocator);
64
65 }
66
67
68
69 }
|
47 try {
48 if (gate != null) {
49 gate.await();
50 }
51 } catch (InterruptedException | BrokenBarrierException e) {
52 // At this point, interrupt would be an error.
53 e.printStackTrace();
54 throw new RuntimeException(e);
55 }
56
57 while (!Thread.interrupted()) {
58 for (int i = 0; i < 1000; i++) {
59 allocator.tick();
60 }
61 }
62
63 // System.out.println("+ [" + id + "] " + allocator);
64
65 }
66
67 }
|