Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
iluwatar#1627 interrupting the thread
  • Loading branch information
karthikbhat13 committed Jun 16, 2021
commit 7f62608d80c1c72fac03c732a1a08e2c036a6767
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void delayedSquaring(final Consumer consumer) {
Thread.sleep((long) (Math.random() * (maxTimeOut - minTimeOut) + minTimeOut));
} catch (InterruptedException e) {
LOGGER.error("Exception while sleep ", e);
Thread.currentThread().interrupt();
} finally {
consumer.add(number * number);
}
Expand Down