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

Method StickHolder

concurrent/StickHolder.java:12–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 private BlockingQueue<Chopstick> holder =
11 new ArrayBlockingQueue<>(1);
12 public StickHolder() { putDown(); }
13 public void pickUp() {
14 try {
15 holder.take(); // Blocks if unavailable

Callers

nothing calls this directly

Calls 1

putDownMethod · 0.95

Tested by

no test coverage detected