@Test(expected = InterruptedException.class) public void testInterrupted() throws InterruptedException { Thread.currentThread().interrupt(); queue.consume(); }
public List<Span> consume() throws InterruptedException { List<Span> rc; synchronized (this) { while (spans == null) { wait(); } rc = spans; spans = null; } return rc; }
TraceQueue { public List<Span> consume() throws InterruptedException { List<Span> rc; synchronized (this) { while (spans == null) { wait(); } rc = spans; spans = null; } return rc; } }
TraceQueue { public List<Span> consume() throws InterruptedException { List<Span> rc; synchronized (this) { while (spans == null) { wait(); } rc = spans; spans = null; } return rc; }  }
TraceQueue { public List<Span> consume() throws InterruptedException { List<Span> rc; synchronized (this) { while (spans == null) { wait(); } rc = spans; spans = null; } return rc; }  void supply(Span span); List<Span> consume(); }
TraceQueue { public List<Span> consume() throws InterruptedException { List<Span> rc; synchronized (this) { while (spans == null) { wait(); } rc = spans; spans = null; } return rc; }  void supply(Span span); List<Span> consume();  }