Skip to content

Instantly share code, notes, and snippets.

@moaikids
Created March 18, 2013 14:07
Show Gist options
  • Save moaikids/5187378 to your computer and use it in GitHub Desktop.
Save moaikids/5187378 to your computer and use it in GitHub Desktop.
@Override
public boolean process() throws IOException, InterruptedException {
T msg = processNextMessage();
if (msg != null) {
return queue.offer(msg, offerTimeoutMillis, TimeUnit.MILLISECONDS);
} else {
// if its null, just try again
return process();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment