Skip to content

Commit

Permalink
Add some logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardladenthin committed Mar 27, 2024
1 parent 6200615 commit 161c7b2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ public void startConsumer() {
for (int i = 0; i < consumerJava.threads; i++) {
consumers.add(consumeKeysExecutorService.submit(
() -> {
logger.info("start consumeKeysRunner");
consumeKeysRunner();
logger.info("end consumeKeysRunner");
return null;
}));
}
Expand Down Expand Up @@ -178,6 +180,7 @@ private void consumeKeysRunner() {
}

void consumeKeys(ByteBuffer threadLocalReuseableByteBuffer) throws MnemonicException.MnemonicLengthException {
logger.trace("consumeKeys");
PublicKeyBytes[] publicKeyBytesArray = keysQueue.poll();
while (publicKeyBytesArray != null) {
for (PublicKeyBytes publicKeyBytes : publicKeyBytesArray) {
Expand Down Expand Up @@ -322,6 +325,7 @@ public void consumeKeys(PublicKeyBytes[] publicKeyBytes) throws InterruptedExcep

@Override
public void interrupt() {
logger.debug("start interrupt");
shouldRun.set(false);
scheduledExecutorService.shutdown();
consumeKeysExecutorService.shutdown();
Expand All @@ -330,6 +334,7 @@ public void interrupt() {
} catch (InterruptedException ex) {
throw new RuntimeException(ex);
}
logger.debug("finish interrupt");
}

@VisibleForTesting
Expand Down

0 comments on commit 161c7b2

Please sign in to comment.