Skip to content

Commit

Permalink
Use lock.wait(remainingTime) to allow the thread to wait for the rema…
Browse files Browse the repository at this point in the history
…ining time or until it's notified
  • Loading branch information
yufengwangca committed Oct 10, 2023
1 parent d7bf7e7 commit f6f1191
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FutureResult {
}

try {
lock.wait()
lock.wait(remainingTime)
} catch (e: InterruptedException) {
logger.log(Level.INFO, "Wait Result failed with exception: " + e.message)
}
Expand Down

0 comments on commit f6f1191

Please sign in to comment.