Skip to content

Conversation

@dapengzhang0
Copy link
Contributor

Fix our bad example in the sense of issue #6092

if (!Uninterruptibles.awaitUninterruptibly(latch, 1, TimeUnit.SECONDS)) {
throw new RuntimeException("timeout!");
}
Verify.verify(status.getCode() == Status.Code.INTERNAL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to encourage this approach, since that requires users watching on the latch an having another thread sitting around. We shouldn't depend on the latch. We could log instead, or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants