Skip to content

Commit

Permalink
Fix LogStage sleep condition. (#1907)
Browse files Browse the repository at this point in the history
* Fix Logstage sleep condition.

* test restore
  • Loading branch information
Caparow authored Mar 1, 2023
1 parent 38a6709 commit 25fef9e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class QueueingSink(target: LogSink, sleepTime: FiniteDuration = 50.millis) exten
try {
// in case queue was empty we sleep a bit (it's a sane heuristic), otherwise it's better to continue working asap
if (doFlush(maxBatchSize)) {
Thread.sleep(sleepTime.toMillis)
} else {
Thread.`yield`()
} else {
Thread.sleep(sleepTime.toMillis)
}
} catch {
case _: InterruptedException =>
Expand Down

0 comments on commit 25fef9e

Please sign in to comment.