public Integer call() {
   int l = System.identityHashCode(this);
   l = LoopHelpers.compute2(l);
   int s = LoopHelpers.compute1(l);
   l = LoopHelpers.compute2(l);
   s += LoopHelpers.compute1(l);
   return new Integer(s);
 }
Exemplo n.º 2
0
 public final Object call() throws Exception {
   barrier.await();
   int sum = v;
   int x = 0;
   int n = ITERS;
   while (n-- > 0) {
     lock.lockInterruptibly();
     try {
       v = x = LoopHelpers.compute1(v);
     } finally {
       lock.unlock();
     }
     sum += LoopHelpers.compute2(LoopHelpers.compute2(x));
   }
   return new Integer(sum);
 }