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

Method run

lowlevel/PriorityBlockingQueueDemo.java:52–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 queue = q;
51 }
52 @Override public void run() {
53 rand.ints(10, 0, 20)
54 .mapToObj(Prioritized::new)
55 .peek(p -> new Nap(rand.nextDouble() / 10))
56 .forEach(p -> queue.add(p));
57 queue.add(new Prioritized.EndSentinel());
58 }
59}
60
61class Consumer implements Runnable {

Callers

nothing calls this directly

Calls 2

peekMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected