MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / run

Method run

lowlevel/SynchronizedComparison.java:45–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 private AtomicBoolean stop =
44 new AtomicBoolean(false);
45 @Override public void run() {
46 new Timer().schedule(new TimerTask() {
47 public void run() { stop.set(true); }
48 }, 2500);
49 while(!stop.get()) {
50 g.method();
51 successfulCalls.getAndIncrement();
52 }
53 System.out.println(
54 "-> " + successfulCalls.get());
55 }
56}
57
58public class SynchronizedComparison {

Callers

nothing calls this directly

Calls 3

setMethod · 0.65
getMethod · 0.65
methodMethod · 0.45

Tested by

no test coverage detected